1
0
mirror of https://github.com/docker/cli.git synced 2026-01-19 21:41:31 +03:00

Honour $DOCKER_HIDE_LEGACY_COMMANDS in bash completion

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: aa4b0f065b
Component: cli
This commit is contained in:
Harald Albers
2017-01-13 15:43:52 +01:00
committed by Tibor Vass
parent 6cadd5ebe4
commit 10c83e10b1

View File

@@ -3966,11 +3966,30 @@ _docker() {
local previous_extglob_setting=$(shopt -p extglob)
shopt -s extglob
local commands=(
attach
build
commit
local management_commands=(
container
image
network
node
plugin
secret
service
stack
system
volume
)
local top_level_commands=(
build
login
logout
run
search
version
)
local legacy_commands=(
commit
cp
create
diff
@@ -3978,20 +3997,14 @@ _docker() {
exec
export
history
image
images
import
info
inspect
kill
load
login
logout
logs
network
node
pause
plugin
port
ps
pull
@@ -4000,23 +4013,15 @@ _docker() {
restart
rm
rmi
run
save
search
secret
service
stack
start
stats
stop
swarm
system
tag
top
unpause
update
version
volume
wait
)
@@ -4024,6 +4029,8 @@ _docker() {
deploy
)
local commands=(${management_commands[*]} ${top_level_commands[*]} ${DOCKER_HIDE_LEGACY_COMMANDS:+${legacy_commands[*]}})
# These options are valid as global options for all client commands
# and valid as command options for `docker daemon`
local global_boolean_options="