From 1216831bc62392b741eb325b078126f15c84588b Mon Sep 17 00:00:00 2001 From: Steve Durrheimer Date: Thu, 23 Jun 2016 08:52:42 +0200 Subject: [PATCH] Add zsh completion for 'docker run --storage-opt size=' Signed-off-by: Steve Durrheimer --- contrib/completion/zsh/_docker | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/completion/zsh/_docker b/contrib/completion/zsh/_docker index bf9b26548a..78bf797b18 100644 --- a/contrib/completion/zsh/_docker +++ b/contrib/completion/zsh/_docker @@ -1251,6 +1251,7 @@ __docker_subcommand() { "($help)--rm[Remove intermediate containers when it exits]" \ "($help)--sig-proxy[Proxy all received signals to the process (non-TTY mode only)]" \ "($help)--stop-signal=[Signal to kill a container]:signal:_signals" \ + "($help)--storage-opt=[Set storage driver options per container]:storage options:->storage-opt" \ "($help -): :__docker_images" \ "($help -):command: _command_names -e" \ "($help -)*::arguments: _normal" && ret=0 @@ -1263,6 +1264,14 @@ __docker_subcommand() { __docker_runningcontainers -qS ":" && ret=0 fi ;; + (storage-opt) + if compset -P "*="; then + _message "value" && ret=0 + else + opts=('size') + _describe -t filter-opts "storage options" opts -qS "=" && ret=0 + fi + ;; esac ;;