From d9192b85d542a00ebdf4ed7902879ed31db900e4 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Thu, 16 Mar 2017 16:31:57 +0100 Subject: [PATCH] Add bash completion for `service ls --filter mode` 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 272ff02492..9c43498bc0 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -2868,6 +2868,10 @@ _docker_service_ls() { __docker_complete_services --cur "${cur##*=}" --id return ;; + mode) + COMPREPLY=( $( compgen -W "global replicated" -- "${cur##*=}" ) ) + return + ;; name) __docker_complete_services --cur "${cur##*=}" --name return @@ -2876,7 +2880,7 @@ _docker_service_ls() { case "$prev" in --filter|-f) - COMPREPLY=( $( compgen -W "id label name" -S = -- "$cur" ) ) + COMPREPLY=( $( compgen -W "id label mode name" -S = -- "$cur" ) ) __docker_nospace return ;;