Fix bash completion for `docker service ps --filter node`

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2017-02-24 14:09:26 +01:00 committed by Tibor Vass
parent 0ec2d368a8
commit 09b2383b91
1 changed files with 3 additions and 7 deletions

View File

@ -405,10 +405,6 @@ __docker_complete_nodes() {
COMPREPLY=( $(compgen -W "$(__docker_nodes "$@")" -- "$current") ) COMPREPLY=( $(compgen -W "$(__docker_nodes "$@")" -- "$current") )
} }
__docker_complete_nodes_plus_self() {
__docker_complete_nodes --add self "$@"
}
# __docker_services returns a list of all services. Additional options to # __docker_services returns a list of all services. Additional options to
# `docker service ls` may be specified in order to filter the list, e.g. # `docker service ls` may be specified in order to filter the list, e.g.
# `__docker_services --filter name=xxx` # `__docker_services --filter name=xxx`
@ -2914,7 +2910,7 @@ _docker_service_ps() {
return return
;; ;;
node) node)
__docker_complete_nodes_plus_self --cur "${cur##*=}" __docker_complete_nodes --cur "${cur##*=}" --add self
return return
;; ;;
esac esac
@ -3327,7 +3323,7 @@ _docker_node_inspect() {
COMPREPLY=( $( compgen -W "--format -f --help --pretty" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--format -f --help --pretty" -- "$cur" ) )
;; ;;
*) *)
__docker_complete_nodes_plus_self __docker_complete_nodes --add self
esac esac
} }
@ -3421,7 +3417,7 @@ _docker_node_ps() {
COMPREPLY=( $( compgen -W "--filter -f --help --no-resolve --no-trunc" -- "$cur" ) ) COMPREPLY=( $( compgen -W "--filter -f --help --no-resolve --no-trunc" -- "$cur" ) )
;; ;;
*) *)
__docker_complete_nodes_plus_self __docker_complete_nodes --add self
;; ;;
esac esac
} }