mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 13:50:09 +00:00
added exec command to docker plugin
This commit is contained in:
parent
1978a0923c
commit
9e5f0f0e9d
1 changed files with 12 additions and 0 deletions
|
@ -4,6 +4,7 @@
|
||||||
# Requires: Docker installed
|
# Requires: Docker installed
|
||||||
# Author: Azaan (@aeonazaan)
|
# Author: Azaan (@aeonazaan)
|
||||||
# Updates: Bob Maerten (@bobmaerten) for Docker v0.9+
|
# Updates: Bob Maerten (@bobmaerten) for Docker v0.9+
|
||||||
|
# Paul van den Berg (@bergvandenp) for Docker v1.3+
|
||||||
|
|
||||||
|
|
||||||
# ----- Helper functions
|
# ----- Helper functions
|
||||||
|
@ -238,6 +239,14 @@ __wait() {
|
||||||
__docker_containers
|
__docker_containers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__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
|
||||||
|
}
|
||||||
|
|
||||||
# end commands ---------
|
# end commands ---------
|
||||||
# ----------------------
|
# ----------------------
|
||||||
|
|
||||||
|
@ -276,6 +285,7 @@ _1st_arguments=(
|
||||||
"top":"Lookup the running processes of a container"
|
"top":"Lookup the running processes of a 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"
|
||||||
|
"exec":"Run a task inside a running container"
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments '*:: :->command'
|
_arguments '*:: :->command'
|
||||||
|
@ -353,4 +363,6 @@ case "$words[1]" in
|
||||||
__version ;;
|
__version ;;
|
||||||
wait)
|
wait)
|
||||||
__wait ;;
|
__wait ;;
|
||||||
|
exec)
|
||||||
|
__exec ;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue