fix: format usage function output
This commit is contained in:
4
mc
4
mc
@@ -84,7 +84,9 @@ function usage() {
|
|||||||
printf "Positional arguments will fill the JSON objects with values from left to right.\n\n"
|
printf "Positional arguments will fill the JSON objects with values from left to right.\n\n"
|
||||||
printf "COMMANDS:\n"
|
printf "COMMANDS:\n"
|
||||||
for command in "${!commands[@]}"; do
|
for command in "${!commands[@]}"; do
|
||||||
echo -e "\t ${command} $(rest $(rest ${commands[${command}]}))" | sed 's/[":]//g' |sed 's/%s//g'| sed 's/[,]/ /g'
|
local endpoint method body
|
||||||
|
read -r endpoint method body <<<"${commands[${command}]}"
|
||||||
|
echo -e "\t ${command} ${body}" | sed 's/[":\{\}]//g' |sed 's/%s//g'| sed 's/[,]/ /g'
|
||||||
done
|
done
|
||||||
printf "\n"
|
printf "\n"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user