Merge pull request #31330 from albers/completion-fix-node-plus-self

Fix bash completion for `docker service ps --filter node`
This commit is contained in:
Vincent Demeester 2017-02-24 15:35:27 +01:00 committed by GitHub
commit 3470c8d767

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
} }