From feebe9b93bb866ecb8cefc6d0865d192f267137c Mon Sep 17 00:00:00 2001 From: ilguappo Date: Fri, 18 Jul 2025 12:03:46 -0700 Subject: [PATCH] fix: format usage function output --- mc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mc b/mc index b55eb3d..6bab244 100755 --- a/mc +++ b/mc @@ -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" }