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
parent 87e45626f4
commit 4fb663a3b4

View file

@ -405,10 +405,6 @@ __docker_complete_nodes() {
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 service ls` may be specified in order to filter the list, e.g.
# `__docker_services --filter name=xxx`
@ -2914,7 +2910,7 @@ _docker_service_ps() {
return
;;
node)
__docker_complete_nodes_plus_self --cur "${cur##*=}"
__docker_complete_nodes --cur "${cur##*=}" --add self
return
;;
esac
@ -3327,7 +3323,7 @@ _docker_node_inspect() {
COMPREPLY=( $( compgen -W "--format -f --help --pretty" -- "$cur" ) )
;;
*)
__docker_complete_nodes_plus_self
__docker_complete_nodes --add self
esac
}
@ -3413,7 +3409,7 @@ _docker_node_ps() {
COMPREPLY=( $( compgen -W "--filter -f --help --no-resolve --no-trunc" -- "$cur" ) )
;;
*)
__docker_complete_nodes_plus_self
__docker_complete_nodes --add self
;;
esac
}