1 |
commit: 7c594fdefba2aed0c294a144ff82329cdad3205a |
2 |
Author: Tim Harder <radhermit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jan 24 01:02:27 2014 +0000 |
4 |
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jan 24 01:02:27 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/zsh-completion.git;a=commit;h=7c594fde |
7 |
|
8 |
Fix indentation and whitespace |
9 |
|
10 |
--- |
11 |
_eselect | 238 +++++++++++++++++++++++++++++++-------------------------------- |
12 |
1 file changed, 119 insertions(+), 119 deletions(-) |
13 |
|
14 |
diff --git a/_eselect b/_eselect |
15 |
index 0f0362b..9cc28a5 100644 |
16 |
--- a/_eselect |
17 |
+++ b/_eselect |
18 |
@@ -6,166 +6,166 @@ _eselect_env () { |
19 |
"noldconfig[Do not alter the ld.so cache or configuration]" && return 0 |
20 |
fi |
21 |
_values "env options" \ |
22 |
- "help[Display help text]" \ |
23 |
- "usage[Display usage information]" \ |
24 |
- "version[Display version information]" \ |
25 |
- 'update[Collect environment variables from all scripts]' && return 0 |
26 |
+ "help[Display help text]" \ |
27 |
+ "usage[Display usage information]" \ |
28 |
+ "version[Display version information]" \ |
29 |
+ 'update[Collect environment variables from all scripts]' && return 0 |
30 |
} |
31 |
|
32 |
_eselect_binutils () { |
33 |
local binutilslist |
34 |
- if (( $words[(I)(set)] )); then |
35 |
- binutilslist=(${${${(M)${(f)"$(eselect --color=no binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
36 |
- _values "available binutils version" $binutilslist[@] && return 0 |
37 |
- fi |
38 |
+ if (( $words[(I)(set)] )); then |
39 |
+ binutilslist=(${${${(M)${(f)"$(eselect --color=no binutils list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
40 |
+ _values "available binutils version" $binutilslist[@] && return 0 |
41 |
+ fi |
42 |
_values "binutils options" \ |
43 |
- "help[Display help text]" \ |
44 |
- "usage[Display usage information]" \ |
45 |
- "version[Display version information]" \ |
46 |
- "list[List all installed version of binutils]" \ |
47 |
- "show[Print the currently active binutils version]" \ |
48 |
- "set[Activate one of the installed binutils]" && return 0 |
49 |
+ "help[Display help text]" \ |
50 |
+ "usage[Display usage information]" \ |
51 |
+ "version[Display version information]" \ |
52 |
+ "list[List all installed version of binutils]" \ |
53 |
+ "show[Print the currently active binutils version]" \ |
54 |
+ "set[Activate one of the installed binutils]" && return 0 |
55 |
} |
56 |
|
57 |
_eselect_kernel () { |
58 |
local kernellist |
59 |
- if (( $words[(I)(set)] )); then |
60 |
- kernellist=(${${${(M)${(f)"$(eselect --color=no kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
61 |
- _values "available kernel version" $kernellist[@] && return 0 |
62 |
- fi |
63 |
+ if (( $words[(I)(set)] )); then |
64 |
+ kernellist=(${${${(M)${(f)"$(eselect --color=no kernel list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
65 |
+ _values "available kernel version" $kernellist[@] && return 0 |
66 |
+ fi |
67 |
_values "kenrel options" \ |
68 |
- "help[Display help text]" \ |
69 |
- "usage[Display usage information]" \ |
70 |
- "version[Display version information]" \ |
71 |
- "list[List available kernel symlink targets]" \ |
72 |
- "show[Show the current kernel symlink]" \ |
73 |
- "set[Set a new kernel symlink target]" && return 0 |
74 |
+ "help[Display help text]" \ |
75 |
+ "usage[Display usage information]" \ |
76 |
+ "version[Display version information]" \ |
77 |
+ "list[List available kernel symlink targets]" \ |
78 |
+ "show[Show the current kernel symlink]" \ |
79 |
+ "set[Set a new kernel symlink target]" && return 0 |
80 |
} |
81 |
_eselect_ctags () { |
82 |
local ctagslist |
83 |
- if (( $words[(I)(set)] )); then |
84 |
- ctagslist=(${${${(M)${(f)"$(eselect --color=no ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
85 |
- _values "available ctags version" $ctagslist[@] && return 0 |
86 |
- fi |
87 |
+ if (( $words[(I)(set)] )); then |
88 |
+ ctagslist=(${${${(M)${(f)"$(eselect --color=no ctags list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
89 |
+ _values "available ctags version" $ctagslist[@] && return 0 |
90 |
+ fi |
91 |
_values "ctags options" \ |
92 |
- "help[Display help text]" \ |
93 |
- "usage[Display usage information]" \ |
94 |
- "version[Display version information]" \ |
95 |
- "list[List available ctags symlink targets]" \ |
96 |
- "show[Show the current target of the ctags symlink]" \ |
97 |
- "update[Automatically update the ctags symlink]" \ |
98 |
- "set[Set a new ctags symlink target]" && return 0 |
99 |
+ "help[Display help text]" \ |
100 |
+ "usage[Display usage information]" \ |
101 |
+ "version[Display version information]" \ |
102 |
+ "list[List available ctags symlink targets]" \ |
103 |
+ "show[Show the current target of the ctags symlink]" \ |
104 |
+ "update[Automatically update the ctags symlink]" \ |
105 |
+ "set[Set a new ctags symlink target]" && return 0 |
106 |
} |
107 |
_eselect_profile () { |
108 |
local profilelist |
109 |
- if (( $words[(I)(set)] )); then |
110 |
- profilelist=(${${${(M)${(f)"$(eselect --color=no profile list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
111 |
- _values -w "available profiles" $profilelist[@] \ |
112 |
- "--force[Forcibly set the symlink]" && return 0 |
113 |
- fi |
114 |
+ if (( $words[(I)(set)] )); then |
115 |
+ profilelist=(${${${(M)${(f)"$(eselect --color=no profile list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
116 |
+ _values -w "available profiles" $profilelist[@] \ |
117 |
+ "--force[Forcibly set the symlink]" && return 0 |
118 |
+ fi |
119 |
_values "profile options" \ |
120 |
- "help[Display help text]" \ |
121 |
- "usage[Display usage information]" \ |
122 |
- "version[Display version information]" \ |
123 |
- "list[List available profile symlink targets]" \ |
124 |
- "show[Show the current make.profile symlink]" \ |
125 |
- "set[Set a new profile symlink target]" && return 0 |
126 |
+ "help[Display help text]" \ |
127 |
+ "usage[Display usage information]" \ |
128 |
+ "version[Display version information]" \ |
129 |
+ "list[List available profile symlink targets]" \ |
130 |
+ "show[Show the current make.profile symlink]" \ |
131 |
+ "set[Set a new profile symlink target]" && return 0 |
132 |
} |
133 |
_eselect_fontconfig () { |
134 |
local fclistenabled fclistdisabled |
135 |
- if (( $words[(I)(enable)] )); then |
136 |
- fclistdisabled=(${${${${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/}) |
137 |
- _values -w ".conf to enable" $fclistdisabled[@] && return 0 |
138 |
+ if (( $words[(I)(enable)] )); then |
139 |
+ fclistdisabled=(${${${${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/}) |
140 |
+ _values -w ".conf to enable" $fclistdisabled[@] && return 0 |
141 |
elif (( $words[(I)(disable)] )); then |
142 |
- fclistenabled=(${${${(M)${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/}) |
143 |
- _values -w ".conf to disable" $fclistenabled[@] && return 0 |
144 |
- fi |
145 |
+ fclistenabled=(${${${(M)${(M)${(f)"$(eselect --color=no fontconfig list)"}## *}#*\*}// \**/}//( \[*\] | \[*\] )/}) |
146 |
+ _values -w ".conf to disable" $fclistenabled[@] && return 0 |
147 |
+ fi |
148 |
_values "fontconfig options" \ |
149 |
- "help[Display help text]" \ |
150 |
- "usage[Display usage information]" \ |
151 |
- "version[Display version information]" \ |
152 |
- "list[List available fontconfig .conf files]" \ |
153 |
- "disable[Disable specified fontconfig .conf file(s)]" \ |
154 |
- "enable[Enable specified fontconfig .conf file(s)]" && return 0 |
155 |
+ "help[Display help text]" \ |
156 |
+ "usage[Display usage information]" \ |
157 |
+ "version[Display version information]" \ |
158 |
+ "list[List available fontconfig .conf files]" \ |
159 |
+ "disable[Disable specified fontconfig .conf file(s)]" \ |
160 |
+ "enable[Enable specified fontconfig .conf file(s)]" && return 0 |
161 |
} |
162 |
_eselect_opengl () { |
163 |
local opengllist |
164 |
if (( $words[(I)(set)] )); then |
165 |
- opengllist=(${${${(M)${(f)"$(eselect --color=no opengl list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
166 |
+ opengllist=(${${${(M)${(f)"$(eselect --color=no opengl list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
167 |
_values -w "opengl implementations and options" $opengllist[@] \ |
168 |
- "--use-old[If an implementationis already set, use that one instead]" \ |
169 |
- "--prefix[Set the source prefix]:path:_files -/" \ |
170 |
- "--dst-prefix[Set the destination prefix]:path:_files -/" \ |
171 |
- "--impl-headers[Override global headers with ones provided by this profile]" && return 0 |
172 |
+ "--use-old[If an implementationis already set, use that one instead]" \ |
173 |
+ "--prefix[Set the source prefix]:path:_files -/" \ |
174 |
+ "--dst-prefix[Set the destination prefix]:path:_files -/" \ |
175 |
+ "--impl-headers[Override global headers with ones provided by this profile]" && return 0 |
176 |
fi |
177 |
_values "opengl options" \ |
178 |
- "help[Display help text]" \ |
179 |
- "usage[Display usage information]" \ |
180 |
- "version[Display version information]" \ |
181 |
- "list[List the available OpenGL implementations]" \ |
182 |
- "set[Select the OpenGL implementation]" \ |
183 |
- "show[Print the current OpenGL implementation]" && return 0 |
184 |
+ "help[Display help text]" \ |
185 |
+ "usage[Display usage information]" \ |
186 |
+ "version[Display version information]" \ |
187 |
+ "list[List the available OpenGL implementations]" \ |
188 |
+ "set[Select the OpenGL implementation]" \ |
189 |
+ "show[Print the current OpenGL implementation]" && return 0 |
190 |
} |
191 |
_eselect_vi () { |
192 |
local vilist |
193 |
if (( $words[(I)(set)] )); then |
194 |
- vilist=(${${${(M)${(f)"$(eselect --color=no vi list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
195 |
- _values -w "vi implementation" $vilist[@] && return 0 |
196 |
+ vilist=(${${${(M)${(f)"$(eselect --color=no vi list)"}## *}// \**/}//( \[*\] | \[*\] )/}) |
197 |
+ _values -w "vi implementation" $vilist[@] && return 0 |
198 |
elif (( $words[(I)(update)] )); then |
199 |
- _values -w "option" "--if-unset[Do not override existing implementation]" && return 0 |
200 |
+ _values -w "option" "--if-unset[Do not override existing implementation]" && return 0 |
201 |
fi |
202 |
_values "vi options" \ |
203 |
- "help[Display help text]" \ |
204 |
- "usage[Display usage information]" \ |
205 |
- "version[Display version information]" \ |
206 |
- "list[List available vi implementations]" \ |
207 |
- "set[Set a new vi implementation provider]" \ |
208 |
- "show[Show the current vi implementation]" \ |
209 |
- "update[Automatically update the vi provider]" |
210 |
+ "help[Display help text]" \ |
211 |
+ "usage[Display usage information]" \ |
212 |
+ "version[Display version information]" \ |
213 |
+ "list[List available vi implementations]" \ |
214 |
+ "set[Set a new vi implementation provider]" \ |
215 |
+ "show[Show the current vi implementation]" \ |
216 |
+ "update[Automatically update the vi provider]" |
217 |
} |
218 |
_eselect () { |
219 |
- local globopts sedcmd modnames modopts |
220 |
+ local globopts sedcmd modnames modopts |
221 |
|
222 |
- globopts=( |
223 |
- "--colour=no[Disable coloured output]" \ |
224 |
- "--color=no[Disable coloured output]" |
225 |
- ) |
226 |
- modnames=(${${${(M)${(f)"$(eselect --color=no modules list)"}## *}// */}// /}) |
227 |
+ globopts=( |
228 |
+ "--colour=no[Disable coloured output]" \ |
229 |
+ "--color=no[Disable coloured output]" |
230 |
+ ) |
231 |
+ modnames=(${${${(M)${(f)"$(eselect --color=no modules list)"}## *}// */}// /}) |
232 |
|
233 |
- if ((CURRENT == 2)); then |
234 |
- _arguments -s \ |
235 |
- "$globopts[@]" \ |
236 |
- "*:portage:_values 'eselect modules' \$modnames[@]" && return 0 |
237 |
- elif ((CURRENT == 3)); then |
238 |
- if [[ $words[2] == --colour=no || $words[2] == --color=no ]]; then |
239 |
- _arguments -s \ |
240 |
- "*:portage:_values 'eselect modules' \$modnames[@]" && return 0 |
241 |
- elif (( $modnames[(I)$words[2]] )); then |
242 |
- if [[ "$words[2]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then |
243 |
- _eselect_$words[2] "$@" |
244 |
- else |
245 |
- modopts=(${${${(M)${(f)"$(eselect --color=no $words[2] usage)"}## *}// */}// /}) |
246 |
- _arguments -s \ |
247 |
- "*:portage:_values 'eselect $words[2] options' \$modopts[@]" && return 0 |
248 |
- fi |
249 |
- fi |
250 |
- elif ((CURRENT >= 4)); then |
251 |
- if (( $words[(I)(--color=no|--colour=no)] )); then |
252 |
- if (( $modnames[(I)$words[3]] )); then |
253 |
- if [[ "$words[3]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then |
254 |
- _eselect_$words[3] "$@" |
255 |
- else |
256 |
- modopts=(${${${${(M)${(f)"$(eselect --color=no $words[3] usage)"}## *}// */}// /}// *}) |
257 |
- _arguments -s \ |
258 |
- "*:portage:_values 'eselect $words[3] options' \$modopts[@]" && return 0 |
259 |
- fi |
260 |
- fi |
261 |
- else |
262 |
- if (( $modnames[(I)$words[2]] )); then |
263 |
- _eselect_$words[2] "$@" |
264 |
- fi |
265 |
- fi |
266 |
- fi |
267 |
+ if ((CURRENT == 2)); then |
268 |
+ _arguments -s \ |
269 |
+ "$globopts[@]" \ |
270 |
+ "*:portage:_values 'eselect modules' \$modnames[@]" && return 0 |
271 |
+ elif ((CURRENT == 3)); then |
272 |
+ if [[ $words[2] == --colour=no || $words[2] == --color=no ]]; then |
273 |
+ _arguments -s \ |
274 |
+ "*:portage:_values 'eselect modules' \$modnames[@]" && return 0 |
275 |
+ elif (( $modnames[(I)$words[2]] )); then |
276 |
+ if [[ "$words[2]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then |
277 |
+ _eselect_$words[2] "$@" |
278 |
+ else |
279 |
+ modopts=(${${${(M)${(f)"$(eselect --color=no $words[2] usage)"}## *}// */}// /}) |
280 |
+ _arguments -s \ |
281 |
+ "*:portage:_values 'eselect $words[2] options' \$modopts[@]" && return 0 |
282 |
+ fi |
283 |
+ fi |
284 |
+ elif ((CURRENT >= 4)); then |
285 |
+ if (( $words[(I)(--color=no|--colour=no)] )); then |
286 |
+ if (( $modnames[(I)$words[3]] )); then |
287 |
+ if [[ "$words[3]" == (env|binutils|kernel|ctags|profile|fontconfig|opengl|vi) ]]; then |
288 |
+ _eselect_$words[3] "$@" |
289 |
+ else |
290 |
+ modopts=(${${${${(M)${(f)"$(eselect --color=no $words[3] usage)"}## *}// */}// /}// *}) |
291 |
+ _arguments -s \ |
292 |
+ "*:portage:_values 'eselect $words[3] options' \$modopts[@]" && return 0 |
293 |
+ fi |
294 |
+ fi |
295 |
+ else |
296 |
+ if (( $modnames[(I)$words[2]] )); then |
297 |
+ _eselect_$words[2] "$@" |
298 |
+ fi |
299 |
+ fi |
300 |
+ fi |
301 |
} |
302 |
|
303 |
_eselect "$@" |