commands
This commit is contained in:
parent
2f180c900e
commit
5e21c1a306
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user