From 5e21c1a3061d555957a1f521dfc4336811be45f7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 21 Apr 2025 20:00:14 +1200 Subject: [PATCH] commands --- src/dropshell-completion.bash | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dropshell-completion.bash b/src/dropshell-completion.bash index 3c591f4..9c34fd7 100755 --- a/src/dropshell-completion.bash +++ b/src/dropshell-completion.bash @@ -9,15 +9,16 @@ _dropshell_completions() { # List of main commands opts="help version status servers templates autocomplete_list_servers autocomplete_list_services autocomplete_list_commands run install backup" + # add all commands to opts + local commands=($(dropshell autocomplete_list_commands)) + opts="${opts} ${commands[*]}" + # If we're completing the first argument, show all commands if [[ ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi - # Get available commands from dropshell - local commands=($(dropshell autocomplete_list_commands)) - # Command-specific completions case "${prev}" in status|templates|autocomplete_list_servers|autocomplete_list_services|autocomplete_list_commands)