Merge pull request #30163 from albers/completion-fix-hide-legacy-commands

Fix treatment of DOCKER_HIDE_LEGACY_COMMANDS in bash completion
This commit is contained in:
Vincent Demeester 2017-01-16 10:01:44 +01:00 committed by GitHub
commit fd0ea76931
1 changed files with 2 additions and 1 deletions

View File

@ -4029,7 +4029,8 @@ _docker() {
deploy
)
local commands=(${management_commands[*]} ${top_level_commands[*]} ${DOCKER_HIDE_LEGACY_COMMANDS:+${legacy_commands[*]}})
local commands=(${management_commands[*]} ${top_level_commands[*]})
[ -z "$DOCKER_HIDE_LEGACY_COMMANDS" ] && commands+=(${legacy_commands[*]})
# These options are valid as global options for all client commands
# and valid as command options for `docker daemon`