From 62f366490b87457e1fb52a09405691cc18787a2e Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Tue, 26 Jan 2016 10:09:25 -0800 Subject: [PATCH] bash completion for `docker daemon --userns-remap` Signed-off-by: Harald Albers --- contrib/completion/bash/docker | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/contrib/completion/bash/docker b/contrib/completion/bash/docker index 74d925576e..20b2af4cf8 100644 --- a/contrib/completion/bash/docker +++ b/contrib/completion/bash/docker @@ -770,6 +770,7 @@ _docker_daemon() { --registry-mirror --storage-driver -s --storage-opt + --userns-remap " case "$prev" in @@ -845,6 +846,15 @@ _docker_daemon() { __docker_complete_log_options return ;; + --userns-remap) + if [[ $cur == *:* ]] ; then + COMPREPLY=( $(compgen -g -- "${cur#*:}") ) + else + COMPREPLY=( $(compgen -u -S : -- "$cur") ) + __docker_nospace + fi + return + ;; $(__docker_to_extglob "$options_with_args") ) return ;;