|
@@ -435,10 +435,10 @@ __docker_append_to_completions() {
|
|
COMPREPLY=( ${COMPREPLY[@]/%/"$1"} )
|
|
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).
|
|
# 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" ]
|
|
[ "$(__docker_q version -f '{{.Server.Experimental}}')" = "true" ]
|
|
}
|
|
}
|
|
|
|
|
|
@@ -906,7 +906,7 @@ _docker_docker() {
|
|
*)
|
|
*)
|
|
local counter=$( __docker_pos_first_nonflag "$(__docker_to_extglob "$global_options_with_args")" )
|
|
local counter=$( __docker_pos_first_nonflag "$(__docker_to_extglob "$global_options_with_args")" )
|
|
if [ $cword -eq $counter ]; then
|
|
if [ $cword -eq $counter ]; then
|
|
- __docker_is_experimental && commands+=(${experimental_commands[*]})
|
|
|
|
|
|
+ __docker_daemon_is_experimental && commands+=(${experimental_commands[*]})
|
|
COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) )
|
|
COMPREPLY=( $( compgen -W "${commands[*]} help" -- "$cur" ) )
|
|
fi
|
|
fi
|
|
;;
|
|
;;
|
|
@@ -1955,7 +1955,7 @@ _docker_daemon() {
|
|
}
|
|
}
|
|
|
|
|
|
_docker_deploy() {
|
|
_docker_deploy() {
|
|
- __docker_is_experimental && _docker_stack_deploy
|
|
|
|
|
|
+ __docker_daemon_is_experimental && _docker_stack_deploy
|
|
}
|
|
}
|
|
|
|
|
|
_docker_diff() {
|
|
_docker_diff() {
|
|
@@ -2052,7 +2052,7 @@ _docker_image_build() {
|
|
--quiet -q
|
|
--quiet -q
|
|
--rm
|
|
--rm
|
|
"
|
|
"
|
|
- __docker_is_experimental && boolean_options+="--squash"
|
|
|
|
|
|
+ __docker_daemon_is_experimental && boolean_options+="--squash"
|
|
|
|
|
|
local all_options="$options_with_args $boolean_options"
|
|
local all_options="$options_with_args $boolean_options"
|
|
|
|
|
|
@@ -3633,7 +3633,7 @@ _docker_stack() {
|
|
_docker_stack_deploy() {
|
|
_docker_stack_deploy() {
|
|
case "$prev" in
|
|
case "$prev" in
|
|
--bundle-file)
|
|
--bundle-file)
|
|
- if __docker_is_experimental ; then
|
|
|
|
|
|
+ if __docker_daemon_is_experimental ; then
|
|
_filedir dab
|
|
_filedir dab
|
|
return
|
|
return
|
|
fi
|
|
fi
|
|
@@ -3647,7 +3647,7 @@ _docker_stack_deploy() {
|
|
case "$cur" in
|
|
case "$cur" in
|
|
-*)
|
|
-*)
|
|
local options="--compose-file -c --help --with-registry-auth"
|
|
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" ) )
|
|
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
|
;;
|
|
;;
|
|
esac
|
|
esac
|