diff options
author | zghember <zghpku@gmail.com> | 2015-01-03 14:41:34 +0800 |
---|---|---|
committer | zghember <zghpku@gmail.com> | 2015-01-03 14:41:34 +0800 |
commit | 8105d4acc960229e8c7fa9dc6936d8ce881c6b8d (patch) | |
tree | 3c3ead3f01aa7cfc645155a3c992f046ec328155 /plugins/docker/_docker | |
parent | 6fd0b73e9aba568640005798f737cd73ad0bfdf4 (diff) | |
parent | 175b4a807383530aa75145b5b6fdedb3ce1f11f2 (diff) | |
download | zsh-8105d4acc960229e8c7fa9dc6936d8ce881c6b8d.tar.gz zsh-8105d4acc960229e8c7fa9dc6936d8ce881c6b8d.tar.bz2 zsh-8105d4acc960229e8c7fa9dc6936d8ce881c6b8d.zip |
Merge commit '175b4a807383530aa75145b5b6fdedb3ce1f11f2'
Diffstat (limited to 'plugins/docker/_docker')
-rw-r--r-- | plugins/docker/_docker | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 28568a6e5..880b6faa6 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -4,6 +4,7 @@ # Requires: Docker installed # Author: Azaan (@aeonazaan) # Updates: Bob Maerten (@bobmaerten) for Docker v0.9+ +# Paul van den Berg (@bergvandenp) for Docker v1.3+ # ----- Helper functions @@ -238,6 +239,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 +285,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 +363,6 @@ case "$words[1]" in __version ;; wait) __wait ;; + exec) + __exec ;; esac |