Rename helper function in bash completion for consistency

Signed-off-by: Harald Albers <github@albersweb.de>
This commit is contained in:
Harald Albers 2017-01-25 10:33:09 +01:00 committed by Tibor Vass
parent 3494343b71
commit a88fb3678d
1 changed files with 8 additions and 8 deletions

View File

@ -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