mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #29111 from albers/fix-completion-service-create-update
Fix bash completion for `docker service create|update
This commit is contained in:
commit
2ef729460d
1 changed files with 9 additions and 1 deletions
|
@ -2874,9 +2874,17 @@ _docker_service_update() {
|
||||||
COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$boolean_options $options_with_args" -- "$cur" ) )
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
local counter=$( __docker_pos_first_nonflag $( __docker_to_alternatives "$options_with_args" ) )
|
||||||
if [ "$subcommand" = "update" ] ; then
|
if [ "$subcommand" = "update" ] ; then
|
||||||
__docker_complete_services
|
if [ $cword -eq $counter ]; then
|
||||||
|
__docker_complete_services
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ $cword -eq $counter ]; then
|
||||||
|
__docker_complete_images
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue