Fix treatment of DOCKER_HIDE_LEGACY_COMMANDS in bash completion

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 12952f537cf1851bfe84706a4e0eb283dc970379
Component: engine
This commit is contained in:
Harald Albers
2017-01-14 04:48:41 -08:00
parent aa503cd1f7
commit c2ac78f864

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`