mirror of https://github.com/docker/cli.git
Add support for `--type=secret` in `docker inspect`
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
2bc240c0f2
commit
578a431fb3
|
@ -2511,7 +2511,7 @@ _docker_inspect() {
|
||||||
;;
|
;;
|
||||||
--type)
|
--type)
|
||||||
if [ -z "$preselected_type" ] ; then
|
if [ -z "$preselected_type" ] ; then
|
||||||
COMPREPLY=( $( compgen -W "container image network node plugin service volume" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "container image network node plugin secret service volume" -- "$cur" ) )
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
@ -2534,6 +2534,7 @@ _docker_inspect() {
|
||||||
$(__docker_networks)
|
$(__docker_networks)
|
||||||
$(__docker_nodes)
|
$(__docker_nodes)
|
||||||
$(__docker_plugins_installed)
|
$(__docker_plugins_installed)
|
||||||
|
$(__docker_secrets)
|
||||||
$(__docker_services)
|
$(__docker_services)
|
||||||
$(__docker_volumes)
|
$(__docker_volumes)
|
||||||
" -- "$cur" ) )
|
" -- "$cur" ) )
|
||||||
|
@ -2553,6 +2554,9 @@ _docker_inspect() {
|
||||||
plugin)
|
plugin)
|
||||||
__docker_complete_plugins_installed
|
__docker_complete_plugins_installed
|
||||||
;;
|
;;
|
||||||
|
secret)
|
||||||
|
__docker_complete_secrets
|
||||||
|
;;
|
||||||
service)
|
service)
|
||||||
__docker_complete_services
|
__docker_complete_services
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -2729,6 +2729,8 @@ __docker_subcommand() {
|
||||||
__docker_complete_nodes && ret=0
|
__docker_complete_nodes && ret=0
|
||||||
elif [[ ${words[(r)--type=plugin]} == --type=plugin ]]; then
|
elif [[ ${words[(r)--type=plugin]} == --type=plugin ]]; then
|
||||||
__docker_complete_plugins && ret=0
|
__docker_complete_plugins && ret=0
|
||||||
|
elif [[ ${words[(r)--type=service]} == --type=secrets ]]; then
|
||||||
|
__docker_complete_secrets && ret=0
|
||||||
elif [[ ${words[(r)--type=service]} == --type=service ]]; then
|
elif [[ ${words[(r)--type=service]} == --type=service ]]; then
|
||||||
__docker_complete_services && ret=0
|
__docker_complete_services && ret=0
|
||||||
elif [[ ${words[(r)--type=volume]} == --type=volume ]]; then
|
elif [[ ${words[(r)--type=volume]} == --type=volume ]]; then
|
||||||
|
@ -2739,6 +2741,7 @@ __docker_subcommand() {
|
||||||
__docker_complete_networks
|
__docker_complete_networks
|
||||||
__docker_complete_nodes
|
__docker_complete_nodes
|
||||||
__docker_complete_plugins
|
__docker_complete_plugins
|
||||||
|
__docker_complete_secrets
|
||||||
__docker_complete_services
|
__docker_complete_services
|
||||||
__docker_complete_volumes && ret=0
|
__docker_complete_volumes && ret=0
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue