mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #19136 from albers/completion-update
bash completion for `docker update`
This commit is contained in:
commit
7104f58ac2
1 changed files with 37 additions and 0 deletions
|
@ -1773,6 +1773,42 @@ _docker_unpause() {
|
|||
esac
|
||||
}
|
||||
|
||||
_docker_update() {
|
||||
local options_with_args="
|
||||
--blkio-weight
|
||||
--cpu-period
|
||||
--cpu-quota
|
||||
--cpuset-cpus
|
||||
--cpuset-mems
|
||||
--cpu-shares
|
||||
--kernel-memory
|
||||
--memory -m
|
||||
--memory-reservation
|
||||
--memory-swap
|
||||
"
|
||||
|
||||
local boolean_options="
|
||||
--help
|
||||
"
|
||||
|
||||
local all_options="$options_with_args $boolean_options"
|
||||
|
||||
case "$prev" in
|
||||
$(__docker_to_extglob "$options_with_args") )
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W "$all_options" -- "$cur" ) )
|
||||
;;
|
||||
*)
|
||||
__docker_complete_containers_all
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_docker_top() {
|
||||
case "$cur" in
|
||||
-*)
|
||||
|
@ -1930,6 +1966,7 @@ _docker() {
|
|||
tag
|
||||
top
|
||||
unpause
|
||||
update
|
||||
version
|
||||
volume
|
||||
wait
|
||||
|
|
Loading…
Reference in a new issue