Skip to content

Commit

Permalink
v1.0.4 - XSH - Fix missing program options details in subcommand usag…
Browse files Browse the repository at this point in the history
…e when subcommand does not define any option nor positional argument
  • Loading branch information
noresources committed Dec 17, 2024
1 parent 4aaa1cf commit 3d8d9ee
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ns/xsl/program/2.0/xsh.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<xsl:value-of select="normalize-space(../../prg:name)" />
<xsl:text> </xsl:text>
<xsl:value-of select="normalize-space(./prg:name)" />
<xsl:if test="./prg:options | prg:values">
<xsl:if test="./prg:options | prg:values | $programNode/prg:options">
<xsl:text> </xsl:text>
<xsl:if test="./prg:options">
<xsl:call-template name="prg.usage.optionListInline">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@noresources/ns-xml",
"version": "1.6.3",
"version": "1.0.4",
"description": "",
"main": "index.js",
"directories": [
Expand Down
16 changes: 14 additions & 2 deletions tools/sh/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ php)
cat << EOFSCUSAGE
php: PHP utilities
Usage:
run-tests php
run-tests php
Program options:
-T, --temp: Keep temporary files
Don't remove temporary files even if test passed
--help: Display program usage
--subcommand-names: Display program subcommand names
EOFSCUSAGE
;;
Expand Down Expand Up @@ -88,7 +94,13 @@ xsd | schema)
cat << EOFSCUSAGE
xsd: XML schema validation tests
Usage:
run-tests xsd
run-tests xsd
Program options:
-T, --temp: Keep temporary files
Don't remove temporary files even if test passed
--help: Display program usage
--subcommand-names: Display program subcommand names
Check if the given files should validate (or not) a XML schema definition
Expand Down

0 comments on commit 3d8d9ee

Please sign in to comment.