Add support for `--type=secret` in `docker inspect`
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Родитель
2bc240c0f2
Коммит
578a431fb3
|
@ -2511,7 +2511,7 @@ _docker_inspect() {
|
|||
;;
|
||||
--type)
|
||||
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
|
||||
fi
|
||||
;;
|
||||
|
@ -2534,6 +2534,7 @@ _docker_inspect() {
|
|||
$(__docker_networks)
|
||||
$(__docker_nodes)
|
||||
$(__docker_plugins_installed)
|
||||
$(__docker_secrets)
|
||||
$(__docker_services)
|
||||
$(__docker_volumes)
|
||||
" -- "$cur" ) )
|
||||
|
@ -2553,6 +2554,9 @@ _docker_inspect() {
|
|||
plugin)
|
||||
__docker_complete_plugins_installed
|
||||
;;
|
||||
secret)
|
||||
__docker_complete_secrets
|
||||
;;
|
||||
service)
|
||||
__docker_complete_services
|
||||
;;
|
||||
|
|
|
@ -2729,6 +2729,8 @@ __docker_subcommand() {
|
|||
__docker_complete_nodes && ret=0
|
||||
elif [[ ${words[(r)--type=plugin]} == --type=plugin ]]; then
|
||||
__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
|
||||
__docker_complete_services && ret=0
|
||||
elif [[ ${words[(r)--type=volume]} == --type=volume ]]; then
|
||||
|
@ -2739,6 +2741,7 @@ __docker_subcommand() {
|
|||
__docker_complete_networks
|
||||
__docker_complete_nodes
|
||||
__docker_complete_plugins
|
||||
__docker_complete_secrets
|
||||
__docker_complete_services
|
||||
__docker_complete_volumes && ret=0
|
||||
fi
|
||||
|
|
Загрузка…
Ссылка в новой задаче