Browse code

improved formatting; redundant attributes deleted

Fedyashev Nikita authored on 15/11/2010 at 20:18:58
Showing 1 changed files
... ...
@@ -1,7 +1,35 @@
1 1
 #compdef vagrant 
2 2
 #autoload
3 3
 
4
-# vagrant zsh completion, based on homebrew completion
4
+# vagrant zsh completion
5
+
6
+local -a _1st_arguments
7
+_1st_arguments=(
8
+    'box:Box commands'
9
+    'destroy:Destroys the vagrant environment'
10
+    'halt:Halts the currently running vagrant environment'
11
+    'help:[TASK] Describe available tasks or one specific task'
12
+    'init:[box_name] [box_url] Initializes current folder for Vagrant usage'
13
+    'package:Packages a vagrant environment for distribution'
14
+    'provision:Run the provisioner'
15
+    'reload:Reload the vagrant environment'
16
+    'resume:Resumes a suspend vagrant environment'
17
+    'ssh:SSH into the currently running environment'
18
+    'ssh_config:outputs .ssh/config valid syntax for connecting to this environment via ssh.'
19
+    'status:Shows the status of the current Vagrant environment.'
20
+    'suspend:Suspends the currently running vagrant environment'
21
+    'up:Creates the vagrant environment'
22
+    'version:Prints the Vagrant version information'
23
+)
24
+
25
+local -a _box_arguments
26
+_box_arguments=(
27
+    'add:NAME URI Add a box to the system'
28
+    'help:COMMAND Describe subcommands or one specific subcommand'
29
+    'list:Lists all installed boxes'
30
+    'remove:NAME Remove a box from the system'
31
+    'repackage:NAME Repackage an installed box into a `.box` file.'
32
+)
5 33
 
6 34
 __task_list ()
7 35
 {
... ...
@@ -36,43 +64,15 @@ __vagrant-box ()
36 36
        (options)
37 37
            case $line[1] in
38 38
                (repackage|remove)
39
-                   _arguments \
40
-                       -F'[Fetch from origin before performing finish]' \
41
-                       -r'[Rebase instead of merge]'\
42
-                         ':feature:__box_list' 
39
+                   _arguments ':feature:__box_list' 
43 40
                ;;
44 41
            esac
45 42
        ;;
46 43
     esac
47 44
 }
48 45
 
49
-local -a _1st_arguments
50
-_1st_arguments=(
51
-    'box:Box commands'
52
-    'destroy:Destroys the vagrant environment'
53
-    'halt:Halts the currently running vagrant environment'
54
-    'help:[TASK] Describe available tasks or one specific task'
55
-    'init:[box_name] [box_url] Initializes current folder for Vagrant usage'
56
-    'package:Packages a vagrant environment for distribution'
57
-    'provision:Run the provisioner'
58
-    'reload:Reload the vagrant environment'
59
-    'resume:Resumes a suspend vagrant environment'
60
-    'ssh:SSH into the currently running environment'
61
-    'ssh_config:outputs .ssh/config valid syntax for connecting to this environment via ssh.'
62
-    'status:Shows the status of the current Vagrant environment.'
63
-    'suspend:Suspends the currently running vagrant environment'
64
-    'up:Creates the vagrant environment'
65
-    'version:Prints the Vagrant version information'
66
-)
67 46
 
68
-local -a _box_arguments
69
-_box_arguments=(
70
-    'add:NAME URI Add a box to the system'
71
-    'help:COMMAND Describe subcommands or one specific subcommand'
72
-    'list:Lists all installed boxes'
73
-    'remove:NAME Remove a box from the system'
74
-    'repackage:NAME Repackage an installed box into a `.box` file.'
75
-)
47
+
76 48
 
77 49
 local expl
78 50
 local -a boxes installed_boxes
... ...
@@ -84,7 +84,6 @@ _arguments -C \
84 84
     ':command:->command' \
85 85
     '*::options:->options'
86 86
 
87
-
88 87
 case $state in
89 88
   (command)
90 89
       _describe -t commands "gem subcommand" _1st_arguments
... ...
@@ -94,10 +93,7 @@ case $state in
94 94
   (options)
95 95
     case $line[1] in
96 96
       (help)
97
-         _arguments \
98
-             -F'[Fetch from origin before performing finish]' \
99
-             -r'[Rebase instead of merge]'\
100
-               ':feature:__task_list' 
97
+         _arguments ':feature:__task_list' 
101 98
       ;;
102 99
 
103 100
       (box)