diff --git a/lib/armbian-configng/config.ng.docs.sh b/lib/armbian-configng/config.ng.docs.sh index c07b2ed37..292d1a4ec 100644 --- a/lib/armbian-configng/config.ng.docs.sh +++ b/lib/armbian-configng/config.ng.docs.sh @@ -485,13 +485,15 @@ Usage: $script_name [option] [arguments] main=Help - Display Legacy Options (Backward Compatible) EOF - # TODO: Migrate More features. + # TODO: Migrate More features. #echo " main=help - Display Legacy cli commands." jq -r --arg script_name "$script_name" ' - .menu[] | - .sub[] | - select(.id | startswith("H") | not) | - " --cli " + .id + " - " + .description + def process_item(item): + " --cli " + item.id + " - " + item.description, + (item.sub[]? | process_item(.)); + + .menu[] | + .sub[]? | process_item(.) ' $json_file } diff --git a/lib/armbian-configng/config.ng.functions.sh b/lib/armbian-configng/config.ng.functions.sh index 946e5717f..b69bdbde6 100644 --- a/lib/armbian-configng/config.ng.functions.sh +++ b/lib/armbian-configng/config.ng.functions.sh @@ -573,15 +573,14 @@ function execute_command() { objects | select(.id == $id) | .command[]?' "$json_file") - + for command in "${commands[@]}"; do - # Check if the command is not in the list of restricted commands + # Check if the command is not in the list of restricted commands [[ -n "$debug" ]] && echo "$command" eval "$command" done } - module_options+=( ["show_message,author"]="Joey Turner" ["show_message,ref_link"]=""