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

Filter completions of docker inspect by --type

Completion now filters the images and containers by given
`--type`.

Signed-off-by: Harald Albers <github@albersweb.de>
Upstream-commit: 57062f2a44
Component: cli
This commit is contained in:
Harald Albers
2015-08-01 08:36:00 -07:00
committed by Tibor Vass
parent 1b7459896b
commit 3851ff8dba

View File

@@ -738,8 +738,17 @@ _docker_inspect() {
COMPREPLY=( $( compgen -W "--format -f --type --help" -- "$cur" ) )
;;
*)
__docker_containers_and_images
;;
case $(__docker_value_of_option --type) in
'')
__docker_containers_and_images
;;
container)
__docker_containers_all
;;
image)
__docker_image_repos_and_tags_and_ids
;;
esac
esac
}