76e1edf31f73e20487d7d7fe4a579361bb86815b

Author
Bob Maerten <bob.maerten@gmail.com>
Committer
Bob Maerten <bob.maerten@gmail.com>
Date

Message

Matching autocomplete for Docker v0.9.1

Many deprecations since 0.8 and new commands.

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/docker/_docker b/plugins/docker/_docker
  2index 12eee7a1537e7cde16f086dbcbc4f72940a715e6..5acd19edf5ecec45f3490d58ae0de4732698737f 100644
  3--- a/plugins/docker/_docker
  4+++ b/plugins/docker/_docker
  5@@ -2,7 +2,8 @@
  6 
  7 # Docker autocompletion for oh-my-zsh
  8 # Requires: Docker installed
  9-# Author : Azaan (@aeonazaan)
 10+# Author: Azaan (@aeonazaan)
 11+# Updates: Bob Maerten (@bobmaerten) for Docker v0.9+
 12 
 13 
 14 # ----- Helper functions
 15@@ -24,21 +25,30 @@ __docker_images() {
 16 # Seperate function for each command, makes extension easier later
 17 # ---------------------------
 18 __attach() {
 19+    _arguments \
 20+        '--no-stdin[Do not attach stdin]' \
 21+        '--sig-proxy[Proxify all received signal to the process (even in non-tty mode)]'
 22     __docker_containers
 23 }
 24 
 25 __build() {
 26     _arguments \
 27-        '-q=false[Suppress verbose build output]' \
 28-        '-t="[fuck to be applied to the resulting image in case of success]' \
 29+        '--no-cache[Do not use cache when building the image]' \
 30+        '(-q,--quiet)'{-q,--quiet}'[Suppress the verbose output generated by the containers]' \
 31+        '--rm[Remove intermediate containers after a successful build]' \
 32+        '(-t,--tag=)'{-t,--tag=}'[Repository name (and optionally a tag) to be applied to the resulting image in case of success]' \
 33         '*:files:_files'
 34 }
 35 
 36 __commit() {
 37     _arguments \
 38-        '-author="[Author]' \
 39-        '-m="[Commit message]' \
 40-        '-run="[Config automatically applied when the image is run.\n]'
 41+        '(-a,--author=)'{-a,--author=}'[Author (eg. "John Hannibal Smith <hannibal@a-team.com>"]' \
 42+        '(-m,--message=)'{-m,--message=}'[Commit message]' \
 43+        '--run=[Config automatically applied when the image is run.]'
 44+    __docker_containers
 45+}
 46+
 47+__cp() {
 48     __docker_containers
 49 }
 50 
 51@@ -46,21 +56,29 @@ __diff() {
 52     __docker_containers
 53 }
 54 
 55+__events() {
 56+    _arguments \
 57+        '--since=[Show previously created events and then stream.]'
 58+}
 59+
 60 __export() {
 61    __docker_containers
 62 }
 63 
 64-
 65 __history() {
 66+    _arguments \
 67+        '--no-trunc=[Don''t truncate output]' \
 68+        '(-q,--quiet)'{-q,--quiet}'[Only show numeric IDs]'
 69     __docker_images
 70 }
 71 
 72 __images() {
 73     _arguments \
 74-        '-a[show all images]' \
 75-        '-notrunc[dont truncate output]' \
 76-        '-q[only show numeric IDs]' \
 77-        '-viz[output graph in graphviz format]'
 78+        '(-a,--all)'{-a,--all}'[Show all images (by default filter out the intermediate images used to build)]' \
 79+        '--no-trunc[Don''t truncate output]' \
 80+        '(-q,--quiet=)'{-q,--quiet=}'[Only show numeric IDs]' \
 81+        '(-t,--tree=)'{-t,--tree=}'[Output graph in tree format]' \
 82+        '(-v,--viz=)'{-v,--viz=}'[Output graph in graphviz format]'
 83     __docker_images
 84 }
 85 
 86@@ -86,14 +104,20 @@ __kill() {
 87     __docker_containers
 88 }
 89 
 90+__load() {
 91+    _arguments '*:files:_files'
 92+}
 93+
 94 __login() {
 95     _arguments \
 96-        '-e="[email]' \
 97-        '-p="[password]' \
 98-        '-u="[username]' \
 99+        '(-e,--email=)'{-e,-email=}'[Email]' \
100+        '(-p,--password=)'{-p,-password=}'[Password]' \
101+        '(-u,--username=)'{-u,-username=}'[Username]'
102 }
103 
104 __logs() {