mirror of https://github.com/docker/cli.git
Bash completion for docker kill
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
aa33ee11d0
commit
063a4f574a
|
@ -169,6 +169,23 @@ __docker_capabilities() {
|
||||||
" -- "$cur" ) )
|
" -- "$cur" ) )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# a selection of the available signals that is most likely of interest in the
|
||||||
|
# context of docker containers.
|
||||||
|
__docker_signals() {
|
||||||
|
local signals=(
|
||||||
|
SIGCONT
|
||||||
|
SIGHUP
|
||||||
|
SIGINT
|
||||||
|
SIGKILL
|
||||||
|
SIGQUIT
|
||||||
|
SIGSTOP
|
||||||
|
SIGTERM
|
||||||
|
SIGUSR1
|
||||||
|
SIGUSR2
|
||||||
|
)
|
||||||
|
COMPREPLY=( $( compgen -W "${signals[*]} ${signals[*]#SIG}" -- "$( echo $cur | tr '[:lower:]' '[:upper:]')" ) )
|
||||||
|
}
|
||||||
|
|
||||||
_docker_docker() {
|
_docker_docker() {
|
||||||
local boolean_options="
|
local boolean_options="
|
||||||
--api-enable-cors
|
--api-enable-cors
|
||||||
|
@ -417,7 +434,21 @@ _docker_inspect() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_kill() {
|
_docker_kill() {
|
||||||
__docker_containers_running
|
case "$prev" in
|
||||||
|
--signal|-s)
|
||||||
|
__docker_signals
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$cur" in
|
||||||
|
-*)
|
||||||
|
COMPREPLY=( $( compgen -W "--signal -s" -- "$cur" ) )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
__docker_containers_running
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_load() {
|
_docker_load() {
|
||||||
|
|
Loading…
Reference in New Issue