Added docker 1.3 new commands to compdef

This commit is contained in:
Konstantin Gribov 2014-10-29 02:26:14 +03:00
commit e9e0f5dd96

View file

@ -61,6 +61,14 @@ __events() {
'--since=[Show previously created events and then stream.]' '--since=[Show previously created events and then stream.]'
} }
__exec() {
_arguments \
'(-d,--detach)'{-d,--detach}'[Detached mode: run command in the background]' \
'(-i,--interactive)'{-i,--interactive}'[Keep STDIN open even if not attached]' \
'(-t,--tty)'{-t,--tty}'[Allocate a pseudo-TTY]'
__docker_containers
}
__export() { __export() {
__docker_containers __docker_containers
} }
@ -129,6 +137,10 @@ __top() {
__docker_containers __docker_containers
} }
__pause() {
__docker_containers
}
__ps() { __ps() {
_arguments \ _arguments \
'(-a,--all)'{-a,--all}'[Show all containers. Only running containers are shown by default.]' \ '(-a,--all)'{-a,--all}'[Show all containers. Only running containers are shown by default.]' \
@ -230,6 +242,10 @@ __tag() {
__docker_images __docker_images
} }
__unpause() {
__docker_containers
}
__version() { __version() {
# no arguments # no arguments
} }
@ -249,6 +265,7 @@ _1st_arguments=(
"cp":"Copy files/folders from the containers filesystem to the host path" "cp":"Copy files/folders from the containers filesystem to the host path"
"diff":"Inspect changes on a container's filesystem" "diff":"Inspect changes on a container's filesystem"
"events":"Get real time events from the server" "events":"Get real time events from the server"
"exec":"Run a command in an existing container"
"export":"Stream the contents of a container as a tar archive" "export":"Stream the contents of a container as a tar archive"
"history":"Show the history of an image" "history":"Show the history of an image"
"images":"List images" "images":"List images"
@ -259,8 +276,10 @@ _1st_arguments=(
"kill":"Kill a running container" "kill":"Kill a running container"
"load":"Load an image from a tar archive" "load":"Load an image from a tar archive"
"login":"Register or Login to the docker registry server" "login":"Register or Login to the docker registry server"
"logout":"Log out from a Docker registry server"
"logs":"Fetch the logs of a container" "logs":"Fetch the logs of a container"
"port":"Lookup the public-facing port which is NAT-ed to PRIVATE_PORT" "port":"Lookup the public-facing port which is NAT-ed to PRIVATE_PORT"
"pause":"Pause all processes within a container"
"ps":"List containers" "ps":"List containers"
"pull":"Pull an image or a repository from the docker registry server" "pull":"Pull an image or a repository from the docker registry server"
"push":"Push an image or a repository to the docker registry server" "push":"Push an image or a repository to the docker registry server"
@ -274,6 +293,7 @@ _1st_arguments=(
"stop":"Stop a running container" "stop":"Stop a running container"
"tag":"Tag an image into a repository" "tag":"Tag an image into a repository"
"top":"Lookup the running processes of a container" "top":"Lookup the running processes of a container"
"unpause":"Unpause a paused container"
"version":"Show the docker version information" "version":"Show the docker version information"
"wait":"Block until a container stops, then print its exit code" "wait":"Block until a container stops, then print its exit code"
) )
@ -299,6 +319,8 @@ case "$words[1]" in
__diff ;; __diff ;;
events) events)
__events ;; __events ;;
exec)
__exec ;;
export) export)
__export ;; __export ;;
history) history)
@ -323,6 +345,8 @@ case "$words[1]" in
__logs ;; __logs ;;
port) port)
__port ;; __port ;;
pause)
__pause ;;
ps) ps)
__ps ;; __ps ;;
pull) pull)
@ -349,6 +373,8 @@ case "$words[1]" in
__tag ;; __tag ;;
top) top)
__top ;; __top ;;
unpause)
__unpause ;;
version) version)
__version ;; __version ;;
wait) wait)