From 170fa8ca4c56582826dd91a4b876e728a3d845f7 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Fri, 24 Feb 2017 14:29:23 +0100 Subject: [PATCH] Add bash completion for missing filters of `docker node ls` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 7a1b12cd24..8bca0f3d2e 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -3342,15 +3342,23 @@ _docker_node_ls() { __docker_complete_nodes --cur "${cur##*=}" --id return ;; + membership) + COMPREPLY=( $( compgen -W "accepted pending" -- "${cur##*=}" ) ) + return + ;; name) __docker_complete_nodes --cur "${cur##*=}" --name return ;; + role) + COMPREPLY=( $( compgen -W "manager worker" -- "${cur##*=}" ) ) + return + ;; esac case "$prev" in --filter|-f) - COMPREPLY=( $( compgen -W "id label name" -S = -- "$cur" ) ) + COMPREPLY=( $( compgen -W "id label membership name role" -S = -- "$cur" ) ) __docker_nospace return ;;