From 2a6808db87229fb4269251f6bd69e9079cc827b4 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 14 Mar 2018 01:01:25 +0100 Subject: [PATCH] Bash: update trust completions The `docker trust` commands were moved out of experimental, and the `docker trust view` command was changed to `docker trust inspect --pretty`. Signed-off-by: Sebastiaan van Stijn --- contrib/completion/bash/docker | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index efc64abede..a3f1bd0db0 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -4713,9 +4713,9 @@ _docker_tag() { _docker_trust() { local subcommands=" + inspect revoke sign - view " __docker_subcommands "$subcommands" && return @@ -4729,6 +4729,20 @@ _docker_trust() { esac } +_docker_trust_inspect() { + case "$cur" in + -*) + COMPREPLY=( $( compgen -W "--help --pretty" -- "$cur" ) ) + ;; + *) + local counter=$(__docker_pos_first_nonflag) + if [ "$cword" -eq "$counter" ]; then + __docker_complete_images --repo --tag + fi + ;; + esac +} + _docker_trust_revoke() { case "$cur" in -*) @@ -4757,20 +4771,6 @@ _docker_trust_sign() { esac } -_docker_trust_view() { - case "$cur" in - -*) - COMPREPLY=( $( compgen -W "--help" -- "$cur" ) ) - ;; - *) - local counter=$(__docker_pos_first_nonflag) - if [ "$cword" -eq "$counter" ]; then - __docker_complete_images --repo --tag - fi - ;; - esac -} - _docker_unpause() { _docker_container_unpause @@ -4947,6 +4947,7 @@ _docker() { stack swarm system + trust volume ) @@ -4999,7 +5000,6 @@ _docker() { local experimental_commands=( checkpoint deploy - trust ) local commands=(${management_commands[*]} ${top_level_commands[*]})