From 9f2d9da2719adbb1ed53e796658e1858dbeb4acc Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Mon, 20 Feb 2017 16:35:51 +0100 Subject: [PATCH] Hide aliases in bash completion of `docker node|service` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 7d262ebb8c..40b6cc354c 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -2769,7 +2769,11 @@ _docker_network() { prune rm " - __docker_subcommands "$subcommands" && return + local aliases=" + list + remove + " + __docker_subcommands "$subcommands $aliases" && return case "$cur" in -*) @@ -2785,15 +2789,19 @@ _docker_service() { local subcommands=" create inspect - ls list - rm remove + ls + rm scale ps update " __docker_daemon_is_experimental && subcommands+="logs" - __docker_subcommands "$subcommands" && return + local aliases=" + list + remove + " + __docker_subcommands "$subcommands $aliases" && return case "$cur" in -*) @@ -3292,13 +3300,17 @@ _docker_node() { local subcommands=" demote inspect - ls list + ls promote - rm remove + rm ps update " - __docker_subcommands "$subcommands" && return + local aliases=" + list + remove + " + __docker_subcommands "$subcommands $aliases" && return case "$cur" in -*)