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:
Devin Teske 2016-02-13 00:28:48 +00:00
parent e296c1df6f
commit 3ce83dbfcf
2 changed files with 6 additions and 2 deletions

View File

@ -164,9 +164,11 @@ usage()
action_usage()
{
local usage action="$1"
local usage descr action="$1"
eval usage=\"\$jib_${action}_usage\"
echo "Usage: $pgm $usage" >&2
eval descr=\"\$jib_${action}_descr\"
printf "\t%s\n" "$descr"
exit $FAILURE
}

View File

@ -166,9 +166,11 @@ usage()
action_usage()
{
local usage action="$1"
local usage descr action="$1"
eval usage=\"\$jng_${action}_usage\"
echo "Usage: $pgm $usage" >&2
eval descr=\"\$jng_${action}_descr\"
printf "\t%s\n" "$descr"
exit $FAILURE
}