Merge pull request #30823 from albers/completion-plugin-upgrade
Add bash completion for `docker plugin upgrade`
(cherry picked from commit c9fa3eed1b
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
7e11df6273
commit
7a02f05068
1 changed files with 20 additions and 0 deletions
|
@ -3367,6 +3367,7 @@ _docker_plugin() {
|
|||
push
|
||||
rm
|
||||
set
|
||||
upgrade
|
||||
"
|
||||
local aliases="
|
||||
list
|
||||
|
@ -3521,6 +3522,25 @@ _docker_plugin_set() {
|
|||
esac
|
||||
}
|
||||
|
||||
_docker_plugin_upgrade() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "--disable-content-trust --grant-all-permissions --help --skip-remote-check" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
local counter=$(__docker_pos_first_nonflag)
|
||||
if [ $cword -eq $counter ]; then
|
||||
__docker_complete_plugins_installed
|
||||
__ltrim_colon_completions "$cur"
|
||||
elif [ $cword -eq $((counter + 1)) ]; then
|
||||
local plugin_images="$(__docker_plugins_installed)"
|
||||
COMPREPLY=( $(compgen -S : -W "${plugin_images%:*}" -- "$cur") )
|
||||
__docker_nospace
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
_docker_port() {
|
||||
_docker_container_port
|
||||
|
|
Loading…
Reference in a new issue