mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Cleanup after moving all zsh completion logics for the new container command
Signed-off-by: Steve Durrheimer <s.durrheimer@gmail.com>
This commit is contained in:
parent
6a662de965
commit
94863d8c63
1 changed files with 19 additions and 80 deletions
|
@ -611,6 +611,7 @@ __docker_container_subcommand() {
|
||||||
"($help -): :__docker_repositories_with_tags" && ret=0
|
"($help -): :__docker_repositories_with_tags" && ret=0
|
||||||
;;
|
;;
|
||||||
(cp)
|
(cp)
|
||||||
|
local state
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
"($help -L --follow-link)"{-L,--follow-link}"[Always follow symbol link]" \
|
"($help -L --follow-link)"{-L,--follow-link}"[Always follow symbol link]" \
|
||||||
|
@ -627,6 +628,7 @@ __docker_container_subcommand() {
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(create)
|
(create)
|
||||||
|
local state
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
$opts_create_run \
|
$opts_create_run \
|
||||||
|
@ -1815,52 +1817,46 @@ __docker_commands() {
|
||||||
}
|
}
|
||||||
|
|
||||||
__docker_subcommand() {
|
__docker_subcommand() {
|
||||||
local -a _command_args opts_help opts_build
|
local -a _command_args opts_help
|
||||||
local expl help="--help"
|
local expl help="--help"
|
||||||
integer ret=1
|
integer ret=1
|
||||||
|
|
||||||
opts_help=("(: -)--help[Print usage]")
|
opts_help=("(: -)--help[Print usage]")
|
||||||
opts_build=(
|
|
||||||
"($help -c --cpu-shares)"{-c=,--cpu-shares=}"[CPU shares (relative weight)]:CPU shares:(0 10 100 200 500 800 1000)"
|
|
||||||
"($help)--cgroup-parent=[Parent cgroup for the container]:cgroup: "
|
|
||||||
"($help)--cpu-period=[Limit the CPU CFS (Completely Fair Scheduler) period]:CPU period: "
|
|
||||||
"($help)--cpu-quota=[Limit the CPU CFS (Completely Fair Scheduler) quota]:CPU quota: "
|
|
||||||
"($help)--cpu-rt-period=[Limit the CPU real-time period]:CPU real-time period in microseconds: "
|
|
||||||
"($help)--cpu-rt-runtime=[Limit the CPU real-time runtime]:CPU real-time runtime in microseconds: "
|
|
||||||
"($help)--cpuset-cpus=[CPUs in which to allow execution]:CPUs: "
|
|
||||||
"($help)--cpuset-mems=[MEMs in which to allow execution]:MEMs: "
|
|
||||||
"($help)--disable-content-trust[Skip image verification]"
|
|
||||||
"($help)--isolation=[Container isolation technology]:isolation:(default hyperv process)"
|
|
||||||
"($help -m --memory)"{-m=,--memory=}"[Memory limit]:Memory limit: "
|
|
||||||
"($help)--memory-swap=[Total memory limit with swap]:Memory limit: "
|
|
||||||
"($help)*--shm-size=[Size of '/dev/shm' (format is '<number><unit>')]:shm size: "
|
|
||||||
"($help)*--ulimit=[ulimit options]:ulimit: "
|
|
||||||
"($help)--userns=[Container user namespace]:user namespace:(host)"
|
|
||||||
)
|
|
||||||
|
|
||||||
case "$words[1]" in
|
case "$words[1]" in
|
||||||
(attach)
|
(attach|commit|cp|create|diff|exec|export|kill|logs|pause|unpause|port|rename|restart|rm|run|start|stats|stop|top|update|wait)
|
||||||
__docker_container_subcommand && ret=0
|
__docker_container_subcommand && ret=0
|
||||||
;;
|
;;
|
||||||
(build)
|
(build)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
$opts_build \
|
|
||||||
"($help)*--build-arg[Build-time variables]:<varname>=<value>: " \
|
"($help)*--build-arg[Build-time variables]:<varname>=<value>: " \
|
||||||
|
"($help -c --cpu-shares)"{-c=,--cpu-shares=}"[CPU shares (relative weight)]:CPU shares:(0 10 100 200 500 800 1000)" \
|
||||||
|
"($help)--cgroup-parent=[Parent cgroup for the container]:cgroup: " \
|
||||||
"($help)--compress[Compress the build context using gzip]" \
|
"($help)--compress[Compress the build context using gzip]" \
|
||||||
|
"($help)--cpu-period=[Limit the CPU CFS (Completely Fair Scheduler) period]:CPU period: " \
|
||||||
|
"($help)--cpu-quota=[Limit the CPU CFS (Completely Fair Scheduler) quota]:CPU quota: " \
|
||||||
|
"($help)--cpu-rt-period=[Limit the CPU real-time period]:CPU real-time period in microseconds: " \
|
||||||
|
"($help)--cpu-rt-runtime=[Limit the CPU real-time runtime]:CPU real-time runtime in microseconds: " \
|
||||||
|
"($help)--cpuset-cpus=[CPUs in which to allow execution]:CPUs: " \
|
||||||
|
"($help)--cpuset-mems=[MEMs in which to allow execution]:MEMs: " \
|
||||||
|
"($help)--disable-content-trust[Skip image verification]" \
|
||||||
"($help -f --file)"{-f=,--file=}"[Name of the Dockerfile]:Dockerfile:_files" \
|
"($help -f --file)"{-f=,--file=}"[Name of the Dockerfile]:Dockerfile:_files" \
|
||||||
"($help)--force-rm[Always remove intermediate containers]" \
|
"($help)--force-rm[Always remove intermediate containers]" \
|
||||||
|
"($help)--isolation=[Container isolation technology]:isolation:(default hyperv process)" \
|
||||||
"($help)*--label=[Set metadata for an image]:label=value: " \
|
"($help)*--label=[Set metadata for an image]:label=value: " \
|
||||||
|
"($help -m --memory)"{-m=,--memory=}"[Memory limit]:Memory limit: " \
|
||||||
|
"($help)--memory-swap=[Total memory limit with swap]:Memory limit: " \
|
||||||
"($help)--no-cache[Do not use cache when building the image]" \
|
"($help)--no-cache[Do not use cache when building the image]" \
|
||||||
"($help)--pull[Attempt to pull a newer version of the image]" \
|
"($help)--pull[Attempt to pull a newer version of the image]" \
|
||||||
"($help -q --quiet)"{-q,--quiet}"[Suppress verbose build output]" \
|
"($help -q --quiet)"{-q,--quiet}"[Suppress verbose build output]" \
|
||||||
"($help)--rm[Remove intermediate containers after a successful build]" \
|
"($help)--rm[Remove intermediate containers after a successful build]" \
|
||||||
|
"($help)*--shm-size=[Size of '/dev/shm' (format is '<number><unit>')]:shm size: " \
|
||||||
"($help -t --tag)*"{-t=,--tag=}"[Repository, name and tag for the image]: :__docker_repositories_with_tags" \
|
"($help -t --tag)*"{-t=,--tag=}"[Repository, name and tag for the image]: :__docker_repositories_with_tags" \
|
||||||
|
"($help)*--ulimit=[ulimit options]:ulimit: " \
|
||||||
|
"($help)--userns=[Container user namespace]:user namespace:(host)" \
|
||||||
"($help -):path or URL:_directories" && ret=0
|
"($help -):path or URL:_directories" && ret=0
|
||||||
;;
|
;;
|
||||||
(commit)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(container)
|
(container)
|
||||||
local curcontext="$curcontext" state
|
local curcontext="$curcontext" state
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
@ -1878,12 +1874,6 @@ __docker_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(cp)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(create)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(daemon)
|
(daemon)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
|
@ -1973,9 +1963,6 @@ __docker_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(diff)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(events)
|
(events)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
|
@ -1984,12 +1971,6 @@ __docker_subcommand() {
|
||||||
"($help)--until=[Events created until this timestamp]:timestamp: " \
|
"($help)--until=[Events created until this timestamp]:timestamp: " \
|
||||||
"($help)--format=[Format the output using the given go template]:template: " && ret=0
|
"($help)--format=[Format the output using the given go template]:template: " && ret=0
|
||||||
;;
|
;;
|
||||||
(exec)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(export)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(history)
|
(history)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
|
@ -2049,9 +2030,6 @@ __docker_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(kill)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(load)
|
(load)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
|
@ -2070,9 +2048,6 @@ __docker_subcommand() {
|
||||||
$opts_help \
|
$opts_help \
|
||||||
"($help -)1:server: " && ret=0
|
"($help -)1:server: " && ret=0
|
||||||
;;
|
;;
|
||||||
(logs)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(network)
|
(network)
|
||||||
local curcontext="$curcontext" state
|
local curcontext="$curcontext" state
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
@ -2107,9 +2082,6 @@ __docker_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(pause|unpause)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(plugin)
|
(plugin)
|
||||||
local curcontext="$curcontext" state
|
local curcontext="$curcontext" state
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
@ -2127,9 +2099,6 @@ __docker_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(port)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(ps)
|
(ps)
|
||||||
words[1]='ls'
|
words[1]='ls'
|
||||||
__docker_container_subcommand && ret=0
|
__docker_container_subcommand && ret=0
|
||||||
|
@ -2147,15 +2116,6 @@ __docker_subcommand() {
|
||||||
"($help)--disable-content-trust[Skip image signing]" \
|
"($help)--disable-content-trust[Skip image signing]" \
|
||||||
"($help -): :__docker_images" && ret=0
|
"($help -): :__docker_images" && ret=0
|
||||||
;;
|
;;
|
||||||
(rename)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(restart)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(rm)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(rmi)
|
(rmi)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
|
@ -2163,9 +2123,6 @@ __docker_subcommand() {
|
||||||
"($help)--no-prune[Do not delete untagged parents]" \
|
"($help)--no-prune[Do not delete untagged parents]" \
|
||||||
"($help -)*: :__docker_images" && ret=0
|
"($help -)*: :__docker_images" && ret=0
|
||||||
;;
|
;;
|
||||||
(run)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(save)
|
(save)
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
$opts_help \
|
$opts_help \
|
||||||
|
@ -2203,15 +2160,6 @@ __docker_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(start)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(stats)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(stop)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(swarm)
|
(swarm)
|
||||||
local curcontext="$curcontext" state
|
local curcontext="$curcontext" state
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
@ -2235,12 +2183,6 @@ __docker_subcommand() {
|
||||||
"($help -):source:__docker_images"\
|
"($help -):source:__docker_images"\
|
||||||
"($help -):destination:__docker_repositories_with_tags" && ret=0
|
"($help -):destination:__docker_repositories_with_tags" && ret=0
|
||||||
;;
|
;;
|
||||||
(top)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(update)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(volume)
|
(volume)
|
||||||
local curcontext="$curcontext" state
|
local curcontext="$curcontext" state
|
||||||
_arguments $(__docker_arguments) \
|
_arguments $(__docker_arguments) \
|
||||||
|
@ -2258,9 +2200,6 @@ __docker_subcommand() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
(wait)
|
|
||||||
__docker_container_subcommand && ret=0
|
|
||||||
;;
|
|
||||||
(help)
|
(help)
|
||||||
_arguments $(__docker_arguments) ":subcommand:__docker_commands" && ret=0
|
_arguments $(__docker_arguments) ":subcommand:__docker_commands" && ret=0
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue