From 1bbcabf3dd9649a5053ce887f9f6c8f876ba1fe0 Mon Sep 17 00:00:00 2001 From: Paul van den Berg Date: Thu, 18 Dec 2014 22:53:26 +0100 Subject: [PATCH] added exec command to docker plugin --- plugins/docker/_docker | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 28568a6e5..7bea9232f 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -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