Move bash completion logic to new subcommand: exec
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
f15debe56c
commit
8fde0d7f2b
1 changed files with 18 additions and 18 deletions
|
@ -1045,7 +1045,23 @@ _docker_container_diff() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_container_exec() {
|
_docker_container_exec() {
|
||||||
_docker_exec
|
__docker_complete_detach-keys && return
|
||||||
|
|
||||||
|
case "$prev" in
|
||||||
|
--user|-u)
|
||||||
|
__docker_complete_user_group
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$cur" in
|
||||||
|
-*)
|
||||||
|
COMPREPLY=( $( compgen -W "--detach -d --detach-keys -e --env --help --interactive -i --privileged -t --tty -u --user" -- "$cur" ) )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
__docker_complete_containers_running
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_container_export() {
|
_docker_container_export() {
|
||||||
|
@ -1421,23 +1437,7 @@ _docker_events() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_exec() {
|
_docker_exec() {
|
||||||
__docker_complete_detach-keys && return
|
_docker_container_exec
|
||||||
|
|
||||||
case "$prev" in
|
|
||||||
--user|-u)
|
|
||||||
__docker_complete_user_group
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
case "$cur" in
|
|
||||||
-*)
|
|
||||||
COMPREPLY=( $( compgen -W "--detach -d --detach-keys -e --env --help --interactive -i --privileged -t --tty -u --user" -- "$cur" ) )
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
__docker_complete_containers_running
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_docker_export() {
|
_docker_export() {
|
||||||
|
|
Loading…
Reference in a new issue