diff options
author | Robby Russell <robby@planetargon.com> | 2014-12-19 20:30:59 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-12-19 20:30:59 -0800 |
commit | 5167450ef98c1b0fb05b68006412915320a98501 (patch) | |
tree | 2e1d1ee43b068c461f08992298b82a258084e470 /plugins/docker | |
parent | 4a56c6b30b4c7e5ff173464adb1d801a03e997c5 (diff) | |
parent | 9e5f0f0e9d22af07bd6cb4d509e66dfc8cfcd3bd (diff) | |
download | zsh-5167450ef98c1b0fb05b68006412915320a98501.tar.gz zsh-5167450ef98c1b0fb05b68006412915320a98501.tar.bz2 zsh-5167450ef98c1b0fb05b68006412915320a98501.zip |
Merge pull request #3424 from bergvandenp/docker_exec
added exec command to docker plugin
Diffstat (limited to 'plugins/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 |