Move bash completion logic to new subcommand: top
Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
parent
150dcabc0f
commit
4bab104761
1 changed files with 12 additions and 12 deletions
|
@ -1629,7 +1629,17 @@ _docker_container_stop() {
|
|||
}
|
||||
|
||||
_docker_container_top() {
|
||||
_docker_top
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ $cword -eq $counter ]; then
|
||||
__docker_complete_containers_running
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_docker_container_unpause() {
|
||||
|
@ -3022,17 +3032,7 @@ _docker_update() {
|
|||
}
|
||||
|
||||
_docker_top() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ $cword -eq $counter ]; then
|
||||
__docker_complete_containers_running
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
_docker_container_top
|
||||
}
|
||||
|
||||
_docker_version() {
|
||||
|
|
Loading…
Reference in a new issue