mirror of https://github.com/docker/cli.git
Merge pull request #609 from albers/completion-trust
Add bash completion for `docker trust` commands
This commit is contained in:
commit
d0197347ea
|
@ -4510,7 +4510,7 @@ _docker_system() {
|
|||
info
|
||||
prune
|
||||
"
|
||||
__docker_subcommands "$subcommands $aliases" && return
|
||||
__docker_subcommands "$subcommands" && return
|
||||
|
||||
case "$cur" in
|
||||
-*)
|
||||
|
@ -4665,6 +4665,68 @@ _docker_tag() {
|
|||
_docker_image_tag
|
||||
}
|
||||
|
||||
|
||||
_docker_trust() {
|
||||
local subcommands="
|
||||
revoke
|
||||
sign
|
||||
view
|
||||
"
|
||||
__docker_subcommands "$subcommands" && return
|
||||
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
COMPREPLY=( $( compgen -W "$subcommands" -- "$cur" ) )
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_docker_trust_revoke() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help --yes -y" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ "$cword" -eq "$counter" ]; then
|
||||
__docker_complete_images
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_docker_trust_sign() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ "$cword" -eq "$counter" ]; then
|
||||
__docker_complete_images
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_docker_trust_view() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--help" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ "$cword" -eq "$counter" ]; then
|
||||
__docker_complete_images
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
_docker_unpause() {
|
||||
_docker_container_unpause
|
||||
}
|
||||
|
@ -4892,6 +4954,7 @@ _docker() {
|
|||
local experimental_commands=(
|
||||
checkpoint
|
||||
deploy
|
||||
trust
|
||||
)
|
||||
|
||||
local commands=(${management_commands[*]} ${top_level_commands[*]})
|
||||
|
|
Loading…
Reference in New Issue