mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-13 03:12:21 +01:00
added exec command to docker plugin
This commit is contained in:
parent
1978a0923c
commit
1bbcabf3dd
1 changed files with 11 additions and 0 deletions
|
|
@ -238,6 +238,14 @@ __wait() {
|
|||
__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 ---------
|
||||
# ----------------------
|
||||
|
||||
|
|
@ -276,6 +284,7 @@ _1st_arguments=(
|
|||
"top":"Lookup the running processes of a container"
|
||||
"version":"Show the docker version information"
|
||||
"wait":"Block until a container stops, then print its exit code"
|
||||
"exec":"Run a task inside a running container"
|
||||
)
|
||||
|
||||
_arguments '*:: :->command'
|
||||
|
|
@ -353,4 +362,6 @@ case "$words[1]" in
|
|||
__version ;;
|
||||
wait)
|
||||
__wait ;;
|
||||
exec)
|
||||
__exec ;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue