fix: format usage function output

This commit is contained in:
2025-07-18 12:03:46 -07:00
parent 832391a281
commit feebe9b93b

4
mc
View File

@@ -84,7 +84,9 @@ function usage() {
printf "Positional arguments will fill the JSON objects with values from left to right.\n\n"
printf "COMMANDS:\n"
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
printf "\n"
}