Hide bash completion for `docker run|create|build --isolation` on non-windows

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

View File

@ -1375,7 +1375,6 @@ _docker_container_run() {
--ip --ip
--ip6 --ip6
--ipc --ipc
--isolation
--kernel-memory --kernel-memory
--label-file --label-file
--label -l --label -l
@ -1419,6 +1418,7 @@ _docker_container_run() {
--credentialspec --credentialspec
--io-maxbandwidth --io-maxbandwidth
--io-maxiops --io-maxiops
--isolation
" "
local boolean_options=" local boolean_options="
@ -1537,8 +1537,10 @@ _docker_container_run() {
return return
;; ;;
--isolation) --isolation)
__docker_complete_isolation if __docker_daemon_os_is windows ; then
return __docker_complete_isolation
return
fi
;; ;;
--link) --link)
case "$cur" in case "$cur" in
@ -2042,7 +2044,6 @@ _docker_image_build() {
--cpu-period --cpu-period
--cpu-quota --cpu-quota
--file -f --file -f
--isolation
--label --label
--memory -m --memory -m
--memory-swap --memory-swap
@ -2051,6 +2052,9 @@ _docker_image_build() {
--tag -t --tag -t
--ulimit --ulimit
" "
__docker_daemon_os_is windows && options_with_args+="
--isolation
"
local boolean_options=" local boolean_options="
--compress --compress
@ -2081,8 +2085,10 @@ _docker_image_build() {
return return
;; ;;
--isolation) --isolation)
__docker_complete_isolation if __docker_daemon_os_is windows ; then
return __docker_complete_isolation
return
fi
;; ;;
--network) --network)
case "$cur" in case "$cur" in