From 3494343b71f01a4b237574a82c2293f8dc8f66cf Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Wed, 25 Jan 2017 10:29:50 +0100 Subject: [PATCH] Hide bash completion for `docker run|create|build --isolation` on non-windows Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 3125470e46..7c3ea4926f 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -1375,7 +1375,6 @@ _docker_container_run() { --ip --ip6 --ipc - --isolation --kernel-memory --label-file --label -l @@ -1419,6 +1418,7 @@ _docker_container_run() { --credentialspec --io-maxbandwidth --io-maxiops + --isolation " local boolean_options=" @@ -1537,8 +1537,10 @@ _docker_container_run() { return ;; --isolation) - __docker_complete_isolation - return + if __docker_daemon_os_is windows ; then + __docker_complete_isolation + return + fi ;; --link) case "$cur" in @@ -2042,7 +2044,6 @@ _docker_image_build() { --cpu-period --cpu-quota --file -f - --isolation --label --memory -m --memory-swap @@ -2051,6 +2052,9 @@ _docker_image_build() { --tag -t --ulimit " + __docker_daemon_os_is windows && options_with_args+=" + --isolation + " local boolean_options=" --compress @@ -2081,8 +2085,10 @@ _docker_image_build() { return ;; --isolation) - __docker_complete_isolation - return + if __docker_daemon_os_is windows ; then + __docker_complete_isolation + return + fi ;; --network) case "$cur" in