From a88fb3678d3f2c848db48bcc086b8c6cbd65e152 Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Wed, 25 Jan 2017 10:33:09 +0100 Subject: [PATCH] Rename helper function in bash completion for consistency Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 7c3ea4926f..639702a5e2 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -449,10 +449,10 @@ __docker_append_to_completions() { COMPREPLY=( ${COMPREPLY[@]/%/"$1"} ) } -# __docker_is_experimental tests whether the currently configured Docker daemon -# runs in experimental mode. If so, the function exits with 0 (true). +# __docker_daemon_is_experimental tests whether the currently configured Docker +# daemon runs in experimental mode. If so, the function exits with 0 (true). # Otherwise, or if the result cannot be determined, the exit value is 1 (false). -__docker_is_experimental() { +__docker_daemon_is_experimental() { [ "$(__docker_q version -f '{{.Server.Experimental}}')" = "true" ] } @@ -920,7 +920,7 @@ _docker_docker() { *) local counter=$( __docker_pos_first_nonflag "$(__docker_to_extglob "$global_options_with_args")" ) if [ $cword -eq $counter ]; then - __docker_is_experimental && commands+=(${experimental_commands[*]}) + __docker_daemon_is_experimental && commands+=(${experimental_commands[*]}) COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) ) fi ;; @@ -1969,7 +1969,7 @@ _docker_daemon() { } _docker_deploy() { - __docker_is_experimental && _docker_stack_deploy + __docker_daemon_is_experimental && _docker_stack_deploy } _docker_diff() { @@ -2066,7 +2066,7 @@ _docker_image_build() { --quiet -q --rm " - __docker_is_experimental && boolean_options+="--squash" + __docker_daemon_is_experimental && boolean_options+="--squash" local all_options="$options_with_args $boolean_options" @@ -3647,7 +3647,7 @@ _docker_stack() { _docker_stack_deploy() { case "$prev" in --bundle-file) - if __docker_is_experimental ; then + if __docker_daemon_is_experimental ; then _filedir dab return fi @@ -3661,7 +3661,7 @@ _docker_stack_deploy() { case "$cur" in -*) local options="--compose-file -c --help --with-registry-auth" - __docker_is_experimental && options+=" --bundle-file" + __docker_daemon_is_experimental && options+=" --bundle-file" COMPREPLY=( $( compgen -W "$options" -- "$cur" ) ) ;; esac