From 54bea86b03b0191fd65d5e25ee0f677ffc2baffb Mon Sep 17 00:00:00 2001 From: Steve Durrheimer Date: Tue, 12 Jan 2016 22:38:32 +0100 Subject: [PATCH] Add zsh completion for 'docker daemon --userns-remap' Signed-off-by: Steve Durrheimer --- contrib/completion/zsh/_docker | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index 76e9518e4a..fff050c2df 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -634,6 +634,7 @@ __docker_subcommand() { "($help)--tlscert=[Path to TLS certificate file]:PEM file:_files -g "*.(pem|crt)"" \ "($help)--tlskey=[Path to TLS key file]:Key file:_files -g "*.(pem|key)"" \ "($help)--tlsverify[Use TLS and verify the remote]" \ + "($help)--userns-remap=[User/Group setting for user namespaces]:user\:group:->users-groups" \ "($help)--userland-proxy[Use userland proxy for loopback traffic]" && ret=0 case $state in @@ -653,6 +654,14 @@ __docker_subcommand() { _describe -t cluster-store-opts "Cluster Store Options" opts -qS "=" && ret=0 fi ;; + (users-groups) + if compset -P '*:'; then + _groups && ret=0 + else + _describe -t userns-default "default Docker user management" '(default)' && ret=0 + _users && ret=0 + fi + ;; esac ;; (diff)