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>
(cherry picked from commit 69cde5a302)
This commit is contained in:
Harald Albers
2015-08-03 11:29:25 -07:00
committed by David Calavera
parent d19b1b927b
commit 948912f692
+11 -2
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
}