Fix missing description for command usage
While "jng" or "jib" without arguments told you what each sub-command does, sub-command usage didn't tell you (e.g., "jng bridge" or "jib addm" gave only usage and not description).
This commit is contained in:
parent
e9b92972cc
commit
5c7654c555
@ -164,9 +164,11 @@ usage()
|
|||||||
|
|
||||||
action_usage()
|
action_usage()
|
||||||
{
|
{
|
||||||
local usage action="$1"
|
local usage descr action="$1"
|
||||||
eval usage=\"\$jib_${action}_usage\"
|
eval usage=\"\$jib_${action}_usage\"
|
||||||
echo "Usage: $pgm $usage" >&2
|
echo "Usage: $pgm $usage" >&2
|
||||||
|
eval descr=\"\$jib_${action}_descr\"
|
||||||
|
printf "\t%s\n" "$descr"
|
||||||
exit $FAILURE
|
exit $FAILURE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,9 +166,11 @@ usage()
|
|||||||
|
|
||||||
action_usage()
|
action_usage()
|
||||||
{
|
{
|
||||||
local usage action="$1"
|
local usage descr action="$1"
|
||||||
eval usage=\"\$jng_${action}_usage\"
|
eval usage=\"\$jng_${action}_usage\"
|
||||||
echo "Usage: $pgm $usage" >&2
|
echo "Usage: $pgm $usage" >&2
|
||||||
|
eval descr=\"\$jng_${action}_descr\"
|
||||||
|
printf "\t%s\n" "$descr"
|
||||||
exit $FAILURE
|
exit $FAILURE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user