diff options
Diffstat (limited to 'share/bash-completion/container')
-rw-r--r-- | share/bash-completion/container | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/share/bash-completion/container b/share/bash-completion/container index 24205d7..5b57193 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -1,6 +1,6 @@ # Open Infrastructure: compute-tools -# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net> +# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ # @@ -257,14 +257,30 @@ _container() ;; *) - opts="-n --name -f --force" + opts="-n --name -f --force -i --interactive -k --kill" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; esac ;; - restart|rt) + rebuild|rb) + case "${prev}" in + -n|--name) + opts="$(container list -f shell)" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + + *) + opts="-n --name -f --force -v --verbose" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + esac + ;; + + restart|rs) case "${prev}" in -n|--name) opts="$(container list -s -f shell)" @@ -299,7 +315,7 @@ _container() status|st) case "${prev}" in -n|--name) - opts="$(container list -t -f shell)" + opts="$(container list -f shell)" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; |