From bd1c58ccaf0d5514ada266aadc3778919d9d2e67 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Fri, 17 Mar 2017 09:33:55 +0100 Subject: [PATCH] Bash completion for `docker node update` completes only one node `docker node update` accepts only one node. Before this change, bash completion would complete additional nodes. Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index d4f3a2083f..9cf46ae7d4 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -3526,7 +3526,11 @@ _docker_node_update() { COMPREPLY=( $( compgen -W "--availability --help --label-add --label-rm --role" -- "$cur" ) ) ;; *) - __docker_complete_nodes + local counter=$(__docker_pos_first_nonflag '--availability|--label-add|--label-rm|--role') + if [ $cword -eq $counter ]; then + __docker_complete_nodes + fi + ;; esac }