Big rewrite of /etc/zsh/completion.d/, thanks to ft!
[grml-etc-core.git] / grml-etc-core.diff
1 searching for changes
2 changeset:   150:1c8cb321138a
3 user:        Frank Terbeck <ft@grml.org>
4 date:        Tue Apr 17 01:06:26 2007 +0200
5 summary:     moved /etc/zsh/site-functions/_* to /etc/zsh/completion.d/;
6
7 diff -r b72fb5695718 -r 1c8cb321138a etc/zsh/completion.d/_grmlinitd
8 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
9 +++ b/etc/zsh/completion.d/_grmlinitd   Tue Apr 17 01:06:26 2007 +0200
10 @@ -0,0 +1,4 @@
11 +#compdef Start Restart Stop Reload
12 +local scripts
13 +scripts=( ${$(print /etc/init.d/*(x)):t} )
14 +_describe "service startup script" scripts
15 diff -r b72fb5695718 -r 1c8cb321138a etc/zsh/completion.d/_hg
16 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
17 +++ b/etc/zsh/completion.d/_hg  Tue Apr 17 01:06:26 2007 +0200
18 @@ -0,0 +1,481 @@
19 +#compdef hg
20 +
21 +# Zsh completion script for mercurial.  Rename this file to _hg and copy
22 +# it into your zsh function path (/usr/share/zsh/site-functions for
23 +# instance)
24 +#
25 +# Copyright (C) 2005 Steve Borho
26 +#
27 +# This is free software; you can redistribute it and/or modify it under
28 +# the terms of the GNU General Public License as published by the Free
29 +# Software Foundation; either version 2 of the License, or (at your
30 +# option) any later version.
31 +#
32 +
33 +local curcontext="$curcontext" state line
34 +typeset -A opt_args
35 +local subcmds repos tags newFiles addedFiles includeExclude commitMessage
36 +
37 +_mq_state () {
38 +  case "$state" in
39 +    (qapplied)
40 +      compadd $(hg qapplied)
41 +    ;;
42 +    (qunapplied)
43 +      compadd $(hg qunapplied)
44 +    ;;
45 +  esac
46 +}
47 +
48 +tags=($(hg tags 2> /dev/null | sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//'))
49 +subcmds=($(hg -v help | sed -e '1,/^list of commands:/d' \
50 +      -e '/^global options:/,$d' -e '/^ [^ ]/!d; s/[,:].*//g;'))
51 +
52 +# A lot of commands have these arguments
53 +includeExclude=(
54 +        '*-I-[include names matching the given patterns]:dir:_files -W $(hg root) -/'
55 +        '*--include-[include names matching the given patterns]:dir:_files -W $(hg root) -/'
56 +        '*-X-[exclude names matching the given patterns]:dir:_files -W $(hg root) -/'
57 +        '*--exclude-[exclude names matching the given patterns]:dir:_files -W $(hg root) -/')
58 +
59 +commitMessage=(
60 +        '(-m --message -l --logfile --edit)-e[edit commit message]'
61 +        '(-m --message -l --logfile -e)--edit[edit commit message]'
62 +        '(-e --edit -l --logfile --message)-m[use <text> as commit message]:message:'
63 +        '(-e --edit -l --logfile -m)--message[use <text> as commit message]:message:'
64 +        '(-e --edit -m --message --logfile)-l[read the commit message from <file>]:log file:_files'
65 +        '(-e --edit -m --message -l)--logfile[read the commit message from <file>]:log file:_files')
66 +
67 +if [[ $service == "hg" ]]; then
68 +    _arguments -C -A "-*" \
69 +    '(--repository)-R[repository root directory]:root:_files -/' \
70 +    '(-R)--repository[repository root directory]:root:_files -/' \
71 +    '--cwd[change working directory]:new working directory:_files -/' \
72 +    '(--noninteractive)-y[do not prompt, assume yes for any required answers]' \
73 +    '(-y)--noninteractive[do not prompt, assume yes for any required answers]' \
74 +    '(--verbose)-v[enable additional output]' \
75 +    '(-v)--verbose[enable additional output]' \
76 +    '(--quiet)-q[suppress output]' \
77 +    '(-q)--quiet[suppress output]' \
78 +    '(--help)-h[display help and exit]' \
79 +    '(-h)--help[display help and exit]' \
80 +    '--debug[debug mode]' \
81 +    '--debugger[start debugger]' \
82 +    '--traceback[print traceback on exception]' \
83 +    '--time[time how long the command takes]' \
84 +    '--profile[profile]' \
85 +    '--version[output version information and exit]' \
86 +    '*::command:->subcmd' && return 0
87 +
88 +    if (( CURRENT == 1 )); then
89 +        _wanted commands expl 'hg command' compadd -a subcmds
90 +        return
91 +    fi
92 +    service="$words[1]"
93 +    curcontext="${curcontext%:*}=$service:"
94 +fi
95 +
96 +case $service in
97 +    (add)
98 +        newFiles=(${(ps:\0:)"$(hg status -0un .)"})
99 +        _arguments $includeExclude \
100 +        '*:file:->unknown'
101 +        _wanted files expl 'unknown files' compadd -a newFiles
102 +    ;;
103 +
104 +    (addremove)
105 +        _arguments $includeExclude \
106 +        '*:directories:_files -/'  # assume they want to add/remove a dir
107 +    ;;
108 +
109 +    (forget)
110 +        addedFiles=(${(ps:\0:)"$(hg status -0an .)"})
111 +        _arguments $includeExclude  \
112 +        '*:file:->added'
113 +        _wanted files expl 'newly added files' compadd -a addedFiles
114 +    ;;
115 +
116 +    (remove|rm)
117 +        _arguments $includeExclude \
118 +        '*:file:_files'
119 +    ;;
120 +
121 +    (copy|cp)
122 +        _arguments $includeExclude \
123 +        '(--after)-A[record a copy that has already occurred]' \
124 +        '(-A)--after[record a copy that has already occurred]' \
125 +        '(--force)-f[forcibly copy over an existing managed file]' \
126 +        '(-f)--force[forcibly copy over an existing managed file]' \
127 +        '(--parents)-p[append source path to dest]' \
128 +        '(-p)--parents[append source path to dest]' \
129 +        '*:files:_files'
130 +    ;;
131 +
132 +    (rename|mv)
133 +        if (( CURRENT == 2 )); then
134 +            _arguments $includeExclude \
135 +            '(--after)-A[record a rename that has already occurred]' \
136 +            '(-A)--after[record a rename that has already occurred]' \
137 +            '(--force)-f[replace destination if it exists]' \
138 +            '(-F)--force[replace destination if it exists]' \
139 +            '(--parents)-p[append source path to dest]' \
140 +            '(-p)--parents[append source path to dest]' \
141 +            '*:files:_files'
142 +        else
143 +            _arguments '*:destination:_files'
144 +        fi
145 +    ;;
146 +
147 +    (diff)
148 +        _arguments $includeExclude \
149 +        '*-r[revision]:revision:($tags)' \
150 +        '*--rev[revision]:revision:($tags)' \
151 +        '(--text)-a[treat all files as text]' \
152 +        '(-a)--text[treat all files as text]' \
153 +        '*:file:_files'
154 +    ;;
155 +
156 +    (status|st)
157 +        _arguments $includeExclude \
158 +        '(--no-status)-n[hide status prefix]' \
159 +        '(-n)--no-status[hide status prefix]' \
160 +        '(--print0)-0[end filenames with NUL, for use with xargs]' \
161 +        '(-0)--print0[end filenames with NUL, for use with xargs]' \
162 +        '(--modified)-m[show only modified files]' \
163 +        '(-m)--modified[show only modified files]' \
164 +        '(--added)-a[show only added files]' \
165 +        '(-a)--added[show only added files]' \
166 +        '(--removed)-r[show only removed files]' \
167 +        '(-r)--removed[show only removed files]' \
168 +        '(--unknown)-u[show only unknown files]' \
169 +        '(-u)--unknown[show only unknown files]' \
170 +        '*:search pattern, then files:_files'
171 +    ;;
172 +
173 +    (revert)
174 +        addedFiles=(${(ps:\0:)"$(hg status -0amrn .)"})
175 +        _arguments \
176 +        '(--rev)-r[revision to revert to]:revision:($tags)' \
177 +        '(-r)--rev[revision to revert to]:revision:($tags)' \
178 +        '(--nonrecursive)-n[do not recurse into subdirectories]' \
179 +        '(-n)--nonrecursive[do not recurse into subdirectories]' \
180 +        '*:file:->modified'
181 +        _wanted files expl 'mofified files' compadd -a addedFiles
182 +    ;;
183 +
184 +    (commit|ci)
185 +        addedFiles=(${(ps:\0:)"$(hg status -0amrn .)"})
186 +        _arguments $includeExclude \
187 +        '(--addremove)-A[run addremove during commit]' \
188 +        '(-A)--addremove[run addremove during commit]' \
189 +        '(--message)-m[use <txt> as commit message]:string:' \
190 +        '(-m)--message[use <txt> as commit message]:string:' \
191 +        '(--logfile)-l[read commit message from <file>]:.log file:_file -g \*.txt' \
192 +        '(-l)--logfile[read commit message from <file>]:.log file:_file -g \*.txt' \
193 +        '(--date)-d[record datecode as commit date]:date code:' \
194 +        '(-d)--date[record datecode as commit date]:date code:' \
195 +        '(--user)-u[record user as commiter]:user:' \
196 +        '(-u)--user[record user as commiter]:user:' \
197 +        '*:file:->modified'
198 +        _wanted files expl 'mofified files' compadd -a addedFiles
199 +    ;;
200 +
201 +    (cat)
202 +        _arguments $includeExclude \
203 +        '(--output)-o[print output to file with formatted name]:filespec:' \
204 +        '(-o)--output[print output to file with formatted name]:filespec:' \
205 +        '(--rev)-r[revision]:revision:($tags)' \
206 +        '(-r)--rev[revision]:revision:($tags)' \
207 +        '*:file:_files'
208 +    ;;
209 +
210 +    (annotate)
211 +        _arguments $includeExclude \
212 +        '(--rev)-r[annotate the specified revision]:revision:($tags)' \
213 +        '(-r)--rev[annotate the specified revision]:revision:($tags)' \
214 +        '(--text)-a[treat all files as text]' \
215 +        '(-a)--text[treat all files as text]' \
216 +        '(--user)-u[list the author]' \
217 +        '(-u)--user[list the author]' \
218 +        '(--changeset)-c[list the changeset]' \
219 +        '(-c)--changeset[list the changeset]' \
220 +        '(--number)-n[list the revision number (default)]' \
221 +        '(-n)--number[list the revision number (default)]' \
222 +        '*:files:_files'
223 +    ;;
224 +
225 +    (grep)
226 +        _arguments $includeExclude \
227 +        '*-r[search in given revision range]:revision:($tags)' \
228 +        '*--rev[search in given revision range]:revision:($tags)' \
229 +        '--all[print all revisions with matches]' \
230 +        '(-print0)-0[end filenames with NUL, for use with xargs]' \
231 +        '(-0)--print0[end filenames with NUL, for use with xargs]' \
232 +        '(--ignore-case)-i[ignore case when matching]' \
233 +        '(-i)--ignore-case[ignore case when matching]' \
234 +        '(--files-with-matches)-l[print names of files and revs that match]' \
235 +        '(-l)--files-with-matches[print names of files and revs that match]' \
236 +        '(--line-number)-n[print matching line numbers]' \
237 +        '(-n)--line-number[print matching line numbers]' \
238 +        '(--user)-u[print user who committed change]' \
239 +        '(-u)--user[print user who committed change]' \
240 +        '*:search pattern:'
241 +    ;;
242 +
243 +    (locate)
244 +        _arguments $includeExclude \
245 +        '(--rev)-r[search repository as it stood at revision]:revision:($tags)' \
246 +        '(-r)--rev[search repository as it stood at revision]:revision:($tags)' \
247 +        '(--print0)-0[end filenames with NUL, for use with xargs]' \
248 +        '(-0)--print0[end filenames with NUL, for use with xargs]' \
249 +        '(--fullpath)-f[print complete paths]' \
250 +        '(-f)--fullpath[print complete paths]' \
251 +        '*:search pattern:'
252 +    ;;
253 +
254 +    (log|history)
255 +        _arguments $includeExclude \
256 +        '*-r[show the specified revision or range]:revision:($tags)' \
257 +        '*--rev[show the specified revision or range]:revision:($tags)' \
258 +        '(--no-merges -M --only-merges)-m[show only merge revisions]' \
259 +        '(--no-merges -M -m)--only-merges[show only merge revisions]' \
260 +        '(--only-merges -m --no-merges)-M[do not show merge revisions]' \
261 +        '(--only-merges -m -M)--no-merges[do not show merge revisions]' \
262 +        '(--keyword)-k[search for a keyword]:keyword:' \
263 +        '(-k)--keyword[search for a keyword]:keyword:' \
264 +        '(--branch)-b[show branches]' \
265 +        '(-b)--branch[show branches]' \
266 +        '(--patch)-p[show patch]' \
267 +        '(-p)--patch[show patch]' \
268 +        '*:file:_files'
269 +    ;;
270 +
271 +    (update|checkout|co)
272 +        _arguments \
273 +        '(--branch)-b[checkout the head of a specific branch]' \
274 +        '(-b)--branch[checkout the head of a specific branch]' \
275 +        '(-C --clean --merge)-m[allow merging of branches]' \
276 +        '(-C --clean -m)--merge[allow merging of branches]' \
277 +        '(-m --merge --clean)-C[overwrite locally modified files]' \
278 +        '(-m --merge -C)--clean[overwrite locally modified files]' \
279 +        '*:revision or tag:($tags)'
280 +    ;;
281 +
282 +    (tag)
283 +        _arguments \
284 +        '(--local)-l[make the tag local]' \
285 +        '(-l)--local[make the tag local]' \
286 +        '(--message)-m[message for tag commit log entry]:string:' \
287 +        '(-m)--message[message for tag commit log entry]:string:' \
288 +        '(--date)-d[record datecode as commit date]:date code:' \
289 +        '(-d)--date[record datecode as commit date]:date code:' \
290 +        '(--user)-u[record user as commiter]:user:' \
291 +        '(-u)--user[record user as commiter]:user:' \
292 +        '*:name, then revision:($tags)'
293 +    ;;
294 +
295 +    (clone)
296 +        if (( CURRENT == 2 )); then
297 +            repos=( $(hg paths | sed -e 's/^.*= //') )
298 +            _arguments \
299 +            '(--no-update)-U[do not update the new working directory]' \
300 +            '(-U)--no-update[do not update the new working directory]' \
301 +            '(--ssh)-e[specify ssh command to use]:string:' \
302 +            '(-e)--ssh[specify ssh command to use]:string:' \
303 +            '--pull[use pull protocol to copy metadata]' \
304 +            '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
305 +            '*:local repo:_files -/'
306 +            _wanted source expl 'source repository' compadd -a repos
307 +        elif (( CURRENT == 3 )); then
308 +            _arguments '*:dest repo:_files -/'
309 +        fi
310 +    ;;
311 +
312 +    (rawcommit)
313 +        _arguments \
314 +        '(--parent)-p[parent revision]:revision:($tags)' \
315 +        '(-p)--parent[parent revision]:revision:($tags)' \
316 +        '(--date)-d[record datecode as commit date]:date code:' \
317 +        '(-d)--date[record datecode as commit date]:date code:' \
318 +        '(--user)-u[record user as commiter]:user:' \
319 +        '(-u)--user[record user as commiter]:user:' \
320 +        '(--message)-m[use <txt> as commit message]:string:' \
321 +        '(-m)--message[use <txt> as commit message]:string:' \
322 +        '(--logfile)-l[read commit message from <file>]:.log file:_file -g \*.txt' \
323 +        '(-l)--logfile[read commit message from <file>]:.log file:_file -g \*.txt' \
324 +        '(--files)-F[file list]:file list:_files' \
325 +        '(-F)--files[file list]:file list:_files' \
326 +        '*:files to commit:_files'
327 +    ;;
328 +
329 +    (bundle)
330 +        if (( CURRENT == 2 )); then
331 +            _arguments '*:changegroup file:_files -g \*.hg'
332 +        elif (( CURRENT == 3 )); then
333 +            _arguments '*:other repo:_files -/'
334 +        fi
335 +    ;;
336 +
337 +    (unbundle)
338 +        _arguments '*:changegroup .hg file:_files -g \*.hg'
339 +    ;;
340 +
341 +    (incoming)
342 +        _arguments \
343 +        '(--patch)-p[show patch]' \
344 +        '(-p)--patch[show patch]' \
345 +        '(--no-merges)-M[do not show merge revisions]' \
346 +        '(-M)--no-merges[do not show merge revisions]' \
347 +        '(--newest-first)-n[show newest record first]' \
348 +        '(-n)--newest-first[show newest record first]' \
349 +        '*:mercurial repository:_files -/'
350 +    ;;
351 +
352 +    (import|patch)
353 +        _arguments \
354 +        '(--strip)-p[directory strip option for patch (default: 1)]:count:' \
355 +        '(-p)--strip[directory strip option for patch (default: 1)]:count:' \
356 +        '(--force)-f[skip check for outstanding uncommitted changes]' \
357 +        '(-f)--force[skip check for outstanding uncommitted changes]' \
358 +        '(--base)-b[base directory to read patches from]:file:_files -W $(hg root) -/' \
359 +        '(-b)--base[base directory to read patches from]:file:_files -W $(hg root) -/' \
360 +        '*:patch file:_files'
361 +    ;;
362 +
363 +    (pull)
364 +        repos=( $(hg paths | sed -e 's/^.*= //') )
365 +        _arguments \
366 +        '(--update)-u[update working directory to tip after pull]' \
367 +        '(-u)--update[update working directory to tip after pull]' \
368 +        '(--ssh)-e[specify ssh command to use]:ssh command:' \
369 +        '(-e)--ssh[specify ssh command to use]:ssh command:' \
370 +        '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
371 +        '*:local repo:_files -/'
372 +        _wanted source expl 'source repository' compadd -a repos
373 +    ;;
374 +
375 +    (outgoing)
376 +        _arguments \
377 +        '(--patch)-p[show patch]' \
378 +        '(-p)--patch[show patch]' \
379 +        '(--no-merges)-M[do not show merge revisions]' \
380 +        '(-M)--no-merges[do not show merge revisions]' \
381 +        '(--newest-first)-n[show newest record first]' \
382 +        '(-n)--newest-first[show newest record first]' \
383 +        '*:local repo:_files -/'
384 +        _wanted source expl 'source repository' compadd -a repos
385 +    ;;
386 +
387 +    (export)
388 +        _arguments \
389 +        '(--outout)-o[print output to file with formatted name]:filespec:' \
390 +        '(-o)--output[print output to file with formatted name]:filespec:' \
391 +        '(--text)-a[treat all files as text]' \
392 +        '(-a)--text[treat all files as text]' \
393 +        '*:revision:->revs'
394 +        _wanted revs expl 'revision or tag' compadd -a tags
395 +    ;;
396 +
397 +    (push)
398 +        repos=( $(hg paths | sed -e 's/^.*= //') )
399 +        _arguments \
400 +        '(--force)-f[force push]' \
401 +        '(-f)--force[force push]' \
402 +        '(--ssh)-e[specify ssh command to use]:ssh command:' \
403 +        '(-e)--ssh[specify ssh command to use]:ssh command:' \
404 +        '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
405 +        '*:local repo:_files -/'
406 +        _wanted source expl 'source repository' compadd -a repos
407 +    ;;
408 +
409 +    (serve)
410 +        _arguments \
411 +        '(--accesslog)-A[name of access log file]:log file:_files' \
412 +        '(-A)--accesslog[name of access log file]:log file:_files' \
413 +        '(--errorlog)-E[name of error log file]:log file:_files' \
414 +        '(-E)--errorlog[name of error log file]:log file:_files' \
415 +        '(--port)-p[listen port]:listen port:' \
416 +        '(-p)--port[listen port]:listen port:' \
417 +        '(--address)-a[interface address]:interface address:' \
418 +        '(-a)--address[interface address]:interface address:' \
419 +        '(--name)-n[name to show in web pages]:repository name:' \
420 +        '(-n)--name[name to show in web pages]:repository name:' \
421 +        '(--templates)-t[web template directory]:template dir:_files -/' \
422 +        '(-t)--templates[web template directory]:template dir:_files -/' \
423 +        '--style[web template style]:style' \
424 +        '--stdio[for remote clients]' \
425 +        '(--ipv6)-6[use IPv6 in addition to IPv4]' \
426 +        '(-6)--ipv6[use IPv6 in addition to IPv4]'
427 +    ;;
428 +
429 +    (help)
430 +        _wanted commands expl 'hg command' compadd -a subcmds
431 +    ;;
432 +
433 +    (heads)
434 +        _arguments \
435 +        '(--branches)-b[find branch info]' \
436 +        '(-b)--branches[find branch info]'
437 +    ;;
438 +
439 +    (paths)
440 +        _arguments '*:symbolic name:(default default-push)'
441 +    ;;
442 +
443 +    (init)
444 +        _arguments '*:new repo directory:_files -/'
445 +    ;;
446 +
447 +    (manifest)
448 +        _arguments '*:revision:($tags)'
449 +    ;;
450 +
451 +    (parents)
452 +        _arguments '*:revision:($tags)'
453 +    ;;
454 +
455 +    (identify|recover|root|undo|view|verify|version|ct|tags)
456 +        # no arguments for these commands
457 +    ;;
458 +
459 +    # MQ commands
460 +    (qdel*|qrm|qrem*)
461 +        _arguments \
462 +            {-k,--keep}'[keep patch file]' \
463 +            {-r,--rev}'[revision]:applied patch:->qapplied' \
464 +            '*:unapplied patches:->qunapplied'
465 +        _mq_state
466 +    ;;
467 +
468 +    (qnew)
469 +        _arguments $commitMessage \
470 +            {-f,--force}'[import uncommitted changes into patch]' \
471 +            ':patch name:'
472 +    ;;
473 +
474 +    (qpo*)
475 +        applied=( $(hg qapplied) )
476 +        _arguments \
477 +            (1){-a,--all}'[pop all patches]' \
478 +            {-f,--force}'[forget any local changes]' \
479 +            ':applied patch:->qapplied'
480 +        _mq_state
481 +    ;;
482 +
483 +    (qpu*)
484 +        _arguments \
485 +            (1){-a,--all}'[apply all patches]' \
486 +            {-f,--force}'[apply if the patch has rejects]' \
487 +            ':unapplied patch:->qunapplied'
488 +        _mq_state
489 +    ;;
490 +    (qref*)
491 +        _arguments $commitMessage $includeExclude \
492 +            {-g,--git}'[use git extended diff format]' \
493 +            {-s,--short}'[short refresh]'
494 +    ;;
495 +
496 +    (*)
497 +        _message "unknown hg command completion: $service"
498 +    ;;
499 +esac
500 diff -r b72fb5695718 -r 1c8cb321138a etc/zsh/site-functions/_grmlinitd
501 --- a/etc/zsh/site-functions/_grmlinitd Sun Apr 15 22:52:43 2007 +0200
502 +++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
503 @@ -1,4 +0,0 @@
504 -#compdef Start Restart Stop Reload
505 -local scripts
506 -scripts=( ${$(print /etc/init.d/*(x)):t} )
507 -_describe "service startup script" scripts
508 diff -r b72fb5695718 -r 1c8cb321138a etc/zsh/site-functions/_hg
509 --- a/etc/zsh/site-functions/_hg        Sun Apr 15 22:52:43 2007 +0200
510 +++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
511 @@ -1,481 +0,0 @@
512 -#compdef hg
513 -
514 -# Zsh completion script for mercurial.  Rename this file to _hg and copy
515 -# it into your zsh function path (/usr/share/zsh/site-functions for
516 -# instance)
517 -#
518 -# Copyright (C) 2005 Steve Borho
519 -#
520 -# This is free software; you can redistribute it and/or modify it under
521 -# the terms of the GNU General Public License as published by the Free
522 -# Software Foundation; either version 2 of the License, or (at your
523 -# option) any later version.
524 -#
525 -
526 -local curcontext="$curcontext" state line
527 -typeset -A opt_args
528 -local subcmds repos tags newFiles addedFiles includeExclude commitMessage
529 -
530 -_mq_state () {
531 -  case "$state" in
532 -    (qapplied)
533 -      compadd $(hg qapplied)
534 -    ;;
535 -    (qunapplied)
536 -      compadd $(hg qunapplied)
537 -    ;;
538 -  esac
539 -}
540 -
541 -tags=($(hg tags 2> /dev/null | sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//'))
542 -subcmds=($(hg -v help | sed -e '1,/^list of commands:/d' \
543 -      -e '/^global options:/,$d' -e '/^ [^ ]/!d; s/[,:].*//g;'))
544 -
545 -# A lot of commands have these arguments
546 -includeExclude=(
547 -        '*-I-[include names matching the given patterns]:dir:_files -W $(hg root) -/'
548 -        '*--include-[include names matching the given patterns]:dir:_files -W $(hg root) -/'
549 -        '*-X-[exclude names matching the given patterns]:dir:_files -W $(hg root) -/'
550 -        '*--exclude-[exclude names matching the given patterns]:dir:_files -W $(hg root) -/')
551 -
552 -commitMessage=(
553 -        '(-m --message -l --logfile --edit)-e[edit commit message]'
554 -        '(-m --message -l --logfile -e)--edit[edit commit message]'
555 -        '(-e --edit -l --logfile --message)-m[use <text> as commit message]:message:'
556 -        '(-e --edit -l --logfile -m)--message[use <text> as commit message]:message:'
557 -        '(-e --edit -m --message --logfile)-l[read the commit message from <file>]:log file:_files'
558 -        '(-e --edit -m --message -l)--logfile[read the commit message from <file>]:log file:_files')
559 -
560 -if [[ $service == "hg" ]]; then
561 -    _arguments -C -A "-*" \
562 -    '(--repository)-R[repository root directory]:root:_files -/' \
563 -    '(-R)--repository[repository root directory]:root:_files -/' \
564 -    '--cwd[change working directory]:new working directory:_files -/' \
565 -    '(--noninteractive)-y[do not prompt, assume yes for any required answers]' \
566 -    '(-y)--noninteractive[do not prompt, assume yes for any required answers]' \
567 -    '(--verbose)-v[enable additional output]' \
568 -    '(-v)--verbose[enable additional output]' \
569 -    '(--quiet)-q[suppress output]' \
570 -    '(-q)--quiet[suppress output]' \
571 -    '(--help)-h[display help and exit]' \
572 -    '(-h)--help[display help and exit]' \
573 -    '--debug[debug mode]' \
574 -    '--debugger[start debugger]' \
575 -    '--traceback[print traceback on exception]' \
576 -    '--time[time how long the command takes]' \
577 -    '--profile[profile]' \
578 -    '--version[output version information and exit]' \
579 -    '*::command:->subcmd' && return 0
580 -
581 -    if (( CURRENT == 1 )); then
582 -        _wanted commands expl 'hg command' compadd -a subcmds
583 -        return
584 -    fi
585 -    service="$words[1]"
586 -    curcontext="${curcontext%:*}=$service:"
587 -fi
588 -
589 -case $service in
590 -    (add)
591 -        newFiles=(${(ps:\0:)"$(hg status -0un .)"})
592 -        _arguments $includeExclude \
593 -        '*:file:->unknown'
594 -        _wanted files expl 'unknown files' compadd -a newFiles
595 -    ;;
596 -
597 -    (addremove)
598 -        _arguments $includeExclude \
599 -        '*:directories:_files -/'  # assume they want to add/remove a dir
600 -    ;;
601 -
602 -    (forget)
603 -        addedFiles=(${(ps:\0:)"$(hg status -0an .)"})
604 -        _arguments $includeExclude  \
605 -        '*:file:->added'
606 -        _wanted files expl 'newly added files' compadd -a addedFiles
607 -    ;;
608 -
609 -    (remove|rm)
610 -        _arguments $includeExclude \
611 -        '*:file:_files'
612 -    ;;
613 -
614 -    (copy|cp)
615 -        _arguments $includeExclude \
616 -        '(--after)-A[record a copy that has already occurred]' \
617 -        '(-A)--after[record a copy that has already occurred]' \
618 -        '(--force)-f[forcibly copy over an existing managed file]' \
619 -        '(-f)--force[forcibly copy over an existing managed file]' \
620 -        '(--parents)-p[append source path to dest]' \
621 -        '(-p)--parents[append source path to dest]' \
622 -        '*:files:_files'
623 -    ;;
624 -
625 -    (rename|mv)
626 -        if (( CURRENT == 2 )); then
627 -            _arguments $includeExclude \
628 -            '(--after)-A[record a rename that has already occurred]' \
629 -            '(-A)--after[record a rename that has already occurred]' \
630 -            '(--force)-f[replace destination if it exists]' \
631 -            '(-F)--force[replace destination if it exists]' \
632 -            '(--parents)-p[append source path to dest]' \
633 -            '(-p)--parents[append source path to dest]' \
634 -            '*:files:_files'
635 -        else
636 -            _arguments '*:destination:_files'
637 -        fi
638 -    ;;
639 -
640 -    (diff)
641 -        _arguments $includeExclude \
642 -        '*-r[revision]:revision:($tags)' \
643 -        '*--rev[revision]:revision:($tags)' \
644 -        '(--text)-a[treat all files as text]' \
645 -        '(-a)--text[treat all files as text]' \
646 -        '*:file:_files'
647 -    ;;
648 -
649 -    (status|st)
650 -        _arguments $includeExclude \
651 -        '(--no-status)-n[hide status prefix]' \
652 -        '(-n)--no-status[hide status prefix]' \
653 -        '(--print0)-0[end filenames with NUL, for use with xargs]' \
654 -        '(-0)--print0[end filenames with NUL, for use with xargs]' \
655 -        '(--modified)-m[show only modified files]' \
656 -        '(-m)--modified[show only modified files]' \
657 -        '(--added)-a[show only added files]' \
658 -        '(-a)--added[show only added files]' \
659 -        '(--removed)-r[show only removed files]' \
660 -        '(-r)--removed[show only removed files]' \
661 -        '(--unknown)-u[show only unknown files]' \
662 -        '(-u)--unknown[show only unknown files]' \
663 -        '*:search pattern, then files:_files'
664 -    ;;
665 -
666 -    (revert)
667 -        addedFiles=(${(ps:\0:)"$(hg status -0amrn .)"})
668 -        _arguments \
669 -        '(--rev)-r[revision to revert to]:revision:($tags)' \
670 -        '(-r)--rev[revision to revert to]:revision:($tags)' \
671 -        '(--nonrecursive)-n[do not recurse into subdirectories]' \
672 -        '(-n)--nonrecursive[do not recurse into subdirectories]' \
673 -        '*:file:->modified'
674 -        _wanted files expl 'mofified files' compadd -a addedFiles
675 -    ;;
676 -
677 -    (commit|ci)
678 -        addedFiles=(${(ps:\0:)"$(hg status -0amrn .)"})
679 -        _arguments $includeExclude \
680 -        '(--addremove)-A[run addremove during commit]' \
681 -        '(-A)--addremove[run addremove during commit]' \
682 -        '(--message)-m[use <txt> as commit message]:string:' \
683 -        '(-m)--message[use <txt> as commit message]:string:' \
684 -        '(--logfile)-l[read commit message from <file>]:.log file:_file -g \*.txt' \
685 -        '(-l)--logfile[read commit message from <file>]:.log file:_file -g \*.txt' \
686 -        '(--date)-d[record datecode as commit date]:date code:' \
687 -        '(-d)--date[record datecode as commit date]:date code:' \
688 -        '(--user)-u[record user as commiter]:user:' \
689 -        '(-u)--user[record user as commiter]:user:' \
690 -        '*:file:->modified'
691 -        _wanted files expl 'mofified files' compadd -a addedFiles
692 -    ;;
693 -
694 -    (cat)
695 -        _arguments $includeExclude \
696 -        '(--output)-o[print output to file with formatted name]:filespec:' \
697 -        '(-o)--output[print output to file with formatted name]:filespec:' \
698 -        '(--rev)-r[revision]:revision:($tags)' \
699 -        '(-r)--rev[revision]:revision:($tags)' \
700 -        '*:file:_files'
701 -    ;;
702 -
703 -    (annotate)
704 -        _arguments $includeExclude \
705 -        '(--rev)-r[annotate the specified revision]:revision:($tags)' \
706 -        '(-r)--rev[annotate the specified revision]:revision:($tags)' \
707 -        '(--text)-a[treat all files as text]' \
708 -        '(-a)--text[treat all files as text]' \
709 -        '(--user)-u[list the author]' \
710 -        '(-u)--user[list the author]' \
711 -        '(--changeset)-c[list the changeset]' \
712 -        '(-c)--changeset[list the changeset]' \
713 -        '(--number)-n[list the revision number (default)]' \
714 -        '(-n)--number[list the revision number (default)]' \
715 -        '*:files:_files'
716 -    ;;
717 -
718 -    (grep)
719 -        _arguments $includeExclude \
720 -        '*-r[search in given revision range]:revision:($tags)' \
721 -        '*--rev[search in given revision range]:revision:($tags)' \
722 -        '--all[print all revisions with matches]' \
723 -        '(-print0)-0[end filenames with NUL, for use with xargs]' \
724 -        '(-0)--print0[end filenames with NUL, for use with xargs]' \
725 -        '(--ignore-case)-i[ignore case when matching]' \
726 -        '(-i)--ignore-case[ignore case when matching]' \
727 -        '(--files-with-matches)-l[print names of files and revs that match]' \
728 -        '(-l)--files-with-matches[print names of files and revs that match]' \
729 -        '(--line-number)-n[print matching line numbers]' \
730 -        '(-n)--line-number[print matching line numbers]' \
731 -        '(--user)-u[print user who committed change]' \
732 -        '(-u)--user[print user who committed change]' \
733 -        '*:search pattern:'
734 -    ;;
735 -
736 -    (locate)
737 -        _arguments $includeExclude \
738 -        '(--rev)-r[search repository as it stood at revision]:revision:($tags)' \
739 -        '(-r)--rev[search repository as it stood at revision]:revision:($tags)' \
740 -        '(--print0)-0[end filenames with NUL, for use with xargs]' \
741 -        '(-0)--print0[end filenames with NUL, for use with xargs]' \
742 -        '(--fullpath)-f[print complete paths]' \
743 -        '(-f)--fullpath[print complete paths]' \
744 -        '*:search pattern:'
745 -    ;;
746 -
747 -    (log|history)
748 -        _arguments $includeExclude \
749 -        '*-r[show the specified revision or range]:revision:($tags)' \
750 -        '*--rev[show the specified revision or range]:revision:($tags)' \
751 -        '(--no-merges -M --only-merges)-m[show only merge revisions]' \
752 -        '(--no-merges -M -m)--only-merges[show only merge revisions]' \
753 -        '(--only-merges -m --no-merges)-M[do not show merge revisions]' \
754 -        '(--only-merges -m -M)--no-merges[do not show merge revisions]' \
755 -        '(--keyword)-k[search for a keyword]:keyword:' \
756 -        '(-k)--keyword[search for a keyword]:keyword:' \
757 -        '(--branch)-b[show branches]' \
758 -        '(-b)--branch[show branches]' \
759 -        '(--patch)-p[show patch]' \
760 -        '(-p)--patch[show patch]' \
761 -        '*:file:_files'
762 -    ;;
763 -
764 -    (update|checkout|co)
765 -        _arguments \
766 -        '(--branch)-b[checkout the head of a specific branch]' \
767 -        '(-b)--branch[checkout the head of a specific branch]' \
768 -        '(-C --clean --merge)-m[allow merging of branches]' \
769 -        '(-C --clean -m)--merge[allow merging of branches]' \
770 -        '(-m --merge --clean)-C[overwrite locally modified files]' \
771 -        '(-m --merge -C)--clean[overwrite locally modified files]' \
772 -        '*:revision or tag:($tags)'
773 -    ;;
774 -
775 -    (tag)
776 -        _arguments \
777 -        '(--local)-l[make the tag local]' \
778 -        '(-l)--local[make the tag local]' \
779 -        '(--message)-m[message for tag commit log entry]:string:' \
780 -        '(-m)--message[message for tag commit log entry]:string:' \
781 -        '(--date)-d[record datecode as commit date]:date code:' \
782 -        '(-d)--date[record datecode as commit date]:date code:' \
783 -        '(--user)-u[record user as commiter]:user:' \
784 -        '(-u)--user[record user as commiter]:user:' \
785 -        '*:name, then revision:($tags)'
786 -    ;;
787 -
788 -    (clone)
789 -        if (( CURRENT == 2 )); then
790 -            repos=( $(hg paths | sed -e 's/^.*= //') )
791 -            _arguments \
792 -            '(--no-update)-U[do not update the new working directory]' \
793 -            '(-U)--no-update[do not update the new working directory]' \
794 -            '(--ssh)-e[specify ssh command to use]:string:' \
795 -            '(-e)--ssh[specify ssh command to use]:string:' \
796 -            '--pull[use pull protocol to copy metadata]' \
797 -            '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
798 -            '*:local repo:_files -/'
799 -            _wanted source expl 'source repository' compadd -a repos
800 -        elif (( CURRENT == 3 )); then
801 -            _arguments '*:dest repo:_files -/'
802 -        fi
803 -    ;;
804 -
805 -    (rawcommit)
806 -        _arguments \
807 -        '(--parent)-p[parent revision]:revision:($tags)' \
808 -        '(-p)--parent[parent revision]:revision:($tags)' \
809 -        '(--date)-d[record datecode as commit date]:date code:' \
810 -        '(-d)--date[record datecode as commit date]:date code:' \
811 -        '(--user)-u[record user as commiter]:user:' \
812 -        '(-u)--user[record user as commiter]:user:' \
813 -        '(--message)-m[use <txt> as commit message]:string:' \
814 -        '(-m)--message[use <txt> as commit message]:string:' \
815 -        '(--logfile)-l[read commit message from <file>]:.log file:_file -g \*.txt' \
816 -        '(-l)--logfile[read commit message from <file>]:.log file:_file -g \*.txt' \
817 -        '(--files)-F[file list]:file list:_files' \
818 -        '(-F)--files[file list]:file list:_files' \
819 -        '*:files to commit:_files'
820 -    ;;
821 -
822 -    (bundle)
823 -        if (( CURRENT == 2 )); then
824 -            _arguments '*:changegroup file:_files -g \*.hg'
825 -        elif (( CURRENT == 3 )); then
826 -            _arguments '*:other repo:_files -/'
827 -        fi
828 -    ;;
829 -
830 -    (unbundle)
831 -        _arguments '*:changegroup .hg file:_files -g \*.hg'
832 -    ;;
833 -
834 -    (incoming)
835 -        _arguments \
836 -        '(--patch)-p[show patch]' \
837 -        '(-p)--patch[show patch]' \
838 -        '(--no-merges)-M[do not show merge revisions]' \
839 -        '(-M)--no-merges[do not show merge revisions]' \
840 -        '(--newest-first)-n[show newest record first]' \
841 -        '(-n)--newest-first[show newest record first]' \
842 -        '*:mercurial repository:_files -/'
843 -    ;;
844 -
845 -    (import|patch)
846 -        _arguments \
847 -        '(--strip)-p[directory strip option for patch (default: 1)]:count:' \
848 -        '(-p)--strip[directory strip option for patch (default: 1)]:count:' \
849 -        '(--force)-f[skip check for outstanding uncommitted changes]' \
850 -        '(-f)--force[skip check for outstanding uncommitted changes]' \
851 -        '(--base)-b[base directory to read patches from]:file:_files -W $(hg root) -/' \
852 -        '(-b)--base[base directory to read patches from]:file:_files -W $(hg root) -/' \
853 -        '*:patch file:_files'
854 -    ;;
855 -
856 -    (pull)
857 -        repos=( $(hg paths | sed -e 's/^.*= //') )
858 -        _arguments \
859 -        '(--update)-u[update working directory to tip after pull]' \
860 -        '(-u)--update[update working directory to tip after pull]' \
861 -        '(--ssh)-e[specify ssh command to use]:ssh command:' \
862 -        '(-e)--ssh[specify ssh command to use]:ssh command:' \
863 -        '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
864 -        '*:local repo:_files -/'
865 -        _wanted source expl 'source repository' compadd -a repos
866 -    ;;
867 -
868 -    (outgoing)
869 -        _arguments \
870 -        '(--patch)-p[show patch]' \
871 -        '(-p)--patch[show patch]' \
872 -        '(--no-merges)-M[do not show merge revisions]' \
873 -        '(-M)--no-merges[do not show merge revisions]' \
874 -        '(--newest-first)-n[show newest record first]' \
875 -        '(-n)--newest-first[show newest record first]' \
876 -        '*:local repo:_files -/'
877 -        _wanted source expl 'source repository' compadd -a repos
878 -    ;;
879 -
880 -    (export)
881 -        _arguments \
882 -        '(--outout)-o[print output to file with formatted name]:filespec:' \
883 -        '(-o)--output[print output to file with formatted name]:filespec:' \
884 -        '(--text)-a[treat all files as text]' \
885 -        '(-a)--text[treat all files as text]' \
886 -        '*:revision:->revs'
887 -        _wanted revs expl 'revision or tag' compadd -a tags
888 -    ;;
889 -
890 -    (push)
891 -        repos=( $(hg paths | sed -e 's/^.*= //') )
892 -        _arguments \
893 -        '(--force)-f[force push]' \
894 -        '(-f)--force[force push]' \
895 -        '(--ssh)-e[specify ssh command to use]:ssh command:' \
896 -        '(-e)--ssh[specify ssh command to use]:ssh command:' \
897 -        '--remotecmd[specify hg command to run on the remote side]:remote hg:' \
898 -        '*:local repo:_files -/'
899 -        _wanted source expl 'source repository' compadd -a repos
900 -    ;;
901 -
902 -    (serve)
903 -        _arguments \
904 -        '(--accesslog)-A[name of access log file]:log file:_files' \
905 -        '(-A)--accesslog[name of access log file]:log file:_files' \
906 -        '(--errorlog)-E[name of error log file]:log file:_files' \
907 -        '(-E)--errorlog[name of error log file]:log file:_files' \
908 -        '(--port)-p[listen port]:listen port:' \
909 -        '(-p)--port[listen port]:listen port:' \
910 -        '(--address)-a[interface address]:interface address:' \
911 -        '(-a)--address[interface address]:interface address:' \
912 -        '(--name)-n[name to show in web pages]:repository name:' \
913 -        '(-n)--name[name to show in web pages]:repository name:' \
914 -        '(--templates)-t[web template directory]:template dir:_files -/' \
915 -        '(-t)--templates[web template directory]:template dir:_files -/' \
916 -        '--style[web template style]:style' \
917 -        '--stdio[for remote clients]' \
918 -        '(--ipv6)-6[use IPv6 in addition to IPv4]' \
919 -        '(-6)--ipv6[use IPv6 in addition to IPv4]'
920 -    ;;
921 -
922 -    (help)
923 -        _wanted commands expl 'hg command' compadd -a subcmds
924 -    ;;
925 -
926 -    (heads)
927 -        _arguments \
928 -        '(--branches)-b[find branch info]' \
929 -        '(-b)--branches[find branch info]'
930 -    ;;
931 -
932 -    (paths)
933 -        _arguments '*:symbolic name:(default default-push)'
934 -    ;;
935 -
936 -    (init)
937 -        _arguments '*:new repo directory:_files -/'
938 -    ;;
939 -
940 -    (manifest)
941 -        _arguments '*:revision:($tags)'
942 -    ;;
943 -
944 -    (parents)
945 -        _arguments '*:revision:($tags)'
946 -    ;;
947 -
948 -    (identify|recover|root|undo|view|verify|version|ct|tags)
949 -        # no arguments for these commands
950 -    ;;
951 -
952 -    # MQ commands
953 -    (qdel*|qrm|qrem*)
954 -        _arguments \
955 -            {-k,--keep}'[keep patch file]' \
956 -            {-r,--rev}'[revision]:applied patch:->qapplied' \
957 -            '*:unapplied patches:->qunapplied'
958 -        _mq_state
959 -    ;;
960 -
961 -    (qnew)
962 -        _arguments $commitMessage \
963 -            {-f,--force}'[import uncommitted changes into patch]' \
964 -            ':patch name:'
965 -    ;;
966 -
967 -    (qpo*)
968 -        applied=( $(hg qapplied) )
969 -        _arguments \
970 -            (1){-a,--all}'[pop all patches]' \
971 -            {-f,--force}'[forget any local changes]' \
972 -            ':applied patch:->qapplied'
973 -        _mq_state
974 -    ;;
975 -
976 -    (qpu*)
977 -        _arguments \
978 -            (1){-a,--all}'[apply all patches]' \
979 -            {-f,--force}'[apply if the patch has rejects]' \
980 -            ':unapplied patch:->qunapplied'
981 -        _mq_state
982 -    ;;
983 -    (qref*)
984 -        _arguments $commitMessage $includeExclude \
985 -            {-g,--git}'[use git extended diff format]' \
986 -            {-s,--short}'[short refresh]'
987 -    ;;
988 -
989 -    (*)
990 -        _message "unknown hg command completion: $service"
991 -    ;;
992 -esac
993 diff -r b72fb5695718 -r 1c8cb321138a etc/zsh/zshrc
994 --- a/etc/zsh/zshrc     Sun Apr 15 22:52:43 2007 +0200
995 +++ b/etc/zsh/zshrc     Tue Apr 17 01:06:26 2007 +0200
996 @@ -88,8 +88,16 @@
997  # Search path for the cd comman
998  #  cdpath=(.. ~)
999  
1000 -# Support our own site-functions
1001 -  [ -d /etc/zsh/site-functions ] && FPATH=/etc/zsh/site-functions:$FPATH
1002 +# completion functions go to /etc/zsh/completion.d
1003 +# function files may be put into /etc/zsh/functions.d, from where they
1004 +# will be automatically autoloaded.
1005 +  [[ -d /etc/zsh/completion.d ]] && fpath+=( /etc/zsh/completion.d )
1006 +  if [[ -d /etc/zsh/functions.d ]] ; then
1007 +    fpath+=( /etc/zsh/functions.d )
1008 +    for func in /etc/zsh/functions.d/[^_]*[^~] ; do
1009 +      autoload -U ${func:t}
1010 +    done
1011 +  fi
1012  
1013  # automatically remove duplicates from these arrays
1014    typeset -U path cdpath fpath manpath
1015 @@ -764,12 +772,6 @@ Run "grml-tips ssl-certificate" if you n
1016  
1017  # {{{ completion stuff
1018  
1019 -# Where to look for autoloaded function definitions
1020 -  if [ -d /etc/zsh/completion.d ] ; then
1021 -    local comp=/etc/zsh/completion.d
1022 -    for func in $comp/*(N-.:t); . ${comp}/${func}
1023 -  fi
1024 -
1025  # called later (via is4 && grmlcomp)
1026  # notice: use 'zstyle' for getting current settings
1027  #         press ^Xh (control-x h) for getting tags in context; ^X? (control-x ?) to run complete_debug with trace output
1028
1029 changeset:   151:af23f3eb99d9
1030 tag:         tip
1031 user:        Frank Terbeck <ft@grml.org>
1032 date:        Tue Apr 17 01:27:50 2007 +0200
1033 summary:     converting zsh completion functions to match common conventions.
1034
1035 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/_debian_rules
1036 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
1037 +++ b/etc/zsh/completion.d/_debian_rules        Tue Apr 17 01:27:50 2007 +0200
1038 @@ -0,0 +1,4 @@
1039 +#compdef debian/rules
1040 +# type debian/rules <TAB> inside a source package
1041 +
1042 +words=(make -f debian/rules) _make
1043 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/_fbset
1044 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
1045 +++ b/etc/zsh/completion.d/_fbset       Tue Apr 17 01:27:50 2007 +0200
1046 @@ -0,0 +1,15 @@
1047 +#compdef fbset
1048 +# simple completion for fbset (switch resolution on console)
1049 +
1050 +fb_modes=(
1051 +  640x480-60 640x480-72 640x480-75 640x480-90 640x480-100
1052 +  768x576-75
1053 +  800x600-48-lace 800x600-56 800x600-60 800x600-70 800x600-72 800x600-75 800x600-90 800x600-100
1054 +  1024x768-43-lace 1024x768-60 1024x768-70 1024x768-72 1024x768-75 1024x768-90 1024x768-100
1055 +  1152x864-43-lace 1152x864-47-lace 1152x864-60 1152x864-70 1152x864-75 1152x864-80
1056 +  1280x960-75-8 1280x960-75 1280x960-75-32
1057 +  1280x1024-43-lace 1280x1024-47-lace 1280x1024-60 1280x1024-70 1280x1024-74 1280x1024-75
1058 +  1600x1200-60 1600x1200-66 1600x1200-76
1059 +)
1060 +
1061 +compadd ${fb_modes}
1062 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/_grml-lang
1063 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
1064 +++ b/etc/zsh/completion.d/_grml-lang   Tue Apr 17 01:27:50 2007 +0200
1065 @@ -0,0 +1,3 @@
1066 +#compdef grml-lang
1067 +
1068 +compadd at ch de us
1069 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/_grml-wallpaper
1070 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
1071 +++ b/etc/zsh/completion.d/_grml-wallpaper      Tue Apr 17 01:27:50 2007 +0200
1072 @@ -0,0 +1,5 @@
1073 +#compdef grml-wallpaper
1074 +
1075 +dirs=(. /usr/share/grml/)
1076 +_description files expl 'set desktop wallpaper on grml system'
1077 +_files "$expl[@]" -W dirs -g '*.{jpg,png}(-.)'
1078 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/_iwconfig
1079 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
1080 +++ b/etc/zsh/completion.d/_iwconfig    Tue Apr 17 01:27:50 2007 +0200
1081 @@ -0,0 +1,86 @@
1082 +#compdef iwconfig
1083 +
1084 +_wlan_interfaces() {
1085 +    local intf
1086 +    intf=$(iwconfig |& egrep 'IEEE 802.11[abg]' | cut -d' ' -f1 | tr ' ' \\n )
1087 +    # intf=$( fgrep ': ' < /proc/net/wireless | cut -d: -f1 | tr \\n ' ' | tr -s " \t" )
1088 +    _wanted interfaces expl 'wireless network interface' \
1089 +        compadd ${intf}
1090 +}
1091 +
1092 +_wlan_networks() {
1093 +    networks=()
1094 +    while read LINE
1095 +    do
1096 +        networks+=$LINE
1097 +    done <<(iwlist scanning 2>/dev/null | grep ESSID | sed -e s/'.*"\(.*\)"'/'\1'/ )
1098 +    _wanted -x names expl 'network name' \
1099 +        compadd off any on ${networks}
1100 +}
1101 +
1102 +local curcontext="$curcontext" state line expl ret=1
1103 +
1104 +_arguments -C \
1105 +  '(1 * -)--help[display help information]' \
1106 +  '(1 * -)--version[display version information]' \
1107 +  '1:network interface:_wlan_interfaces' \
1108 +  '*:parameter:->parameters' && ret=0
1109 +
1110 +if [[ -n "$state" ]]; then
1111 +  local -a arg
1112 +
1113 +  case $words[CURRENT-1] in
1114 +    essid) _wlan_networks;;
1115 +    nwid|domain) _message -e ids 'network id' ;;
1116 +    freq|channel) _message -e channels 'channel or frequency' ;;
1117 +    sens) _message -e levels 'signal level' ;;
1118 +    mode)
1119 +      _wanted modes expl 'operating mode' compadd \
1120 +          Ad-Hoc Managed Master Repeater Secondary Monitor Auto
1121 +    ;;
1122 +    ap) _message -e access-points 'access point' ;;
1123 +    nick*) _message -e names 'nickname' ;;
1124 +    rate|bit*) _message -e bit-rates 'bit rate' ;;
1125 +    rts*|frag*) _message -e sizes 'size' ;;
1126 +    key|enc*) _message -e keys 'key' ;;
1127 +    power)
1128 +      arg=(
1129 +        \*{min,max}'[modifier]'
1130 +    '*off[disable power management]'
1131 +    '*on[enable power management]'
1132 +    '*all[receive all packets]'
1133 +    'unicast[receive unicast packets only]'
1134 +    'multicast[receive multicast and broadcast packets only]'
1135 +      )
1136 +    ;&
1137 +    min|max)
1138 +      _values -S ' ' -w 'parameter' \
1139 +        'period[set the period between wake ups]' \
1140 +    'timeout[set timeout before sleep]' \
1141 +    $arg[@] && ret=0
1142 +    ;;
1143 +    period|timeout) _message -e timeouts 'timeout' ;;
1144 +    txpower) _message -e power 'transmit power' ;;
1145 +    retry) _message -e retries 'retries' ;;
1146 +    *)
1147 +      _values -S ' ' -w 'option' \
1148 +        'essid[set the network name]' \
1149 +    '(nwid domain)'{nwid,domain}'[set the network ID]' \
1150 +    '(freq channel)'{freq,channel}'[set the operating frequency or channel]' \
1151 +    'sens[set the sensitivity threhold]' \
1152 +        'mode[set operating mode]' \
1153 +    'ap[register with given access point]' \
1154 +    '(nick nickname)'nick{,name}'[set the nickname]' \
1155 +    '(rate bit)'{rate,bit}'[set the bitrate]' \
1156 +    'rts[set packet size threshold for sending RTS]' \
1157 +    'frag[set maximum packet fragment size]' \
1158 +    \*{key,enc}'[add encryption key]' \
1159 +    '*power[manipulate power management scheme parameters]' \
1160 +    'txpower[set transmit power]' \
1161 +    'retry[set number of retries]' \
1162 +    'commit[apply changes imediately]' && ret=0
1163 +    ;;
1164 +  esac
1165 +fi
1166 +
1167 +return ret
1168 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/debian_rules
1169 --- a/etc/zsh/completion.d/debian_rules Tue Apr 17 01:06:26 2007 +0200
1170 +++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
1171 @@ -1,2 +0,0 @@
1172 -  _debian_rules() { words=(make -f debian/rules) _make }
1173 -  compdef _debian_rules debian/rules # type debian/rules <TAB> inside a source package
1174 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/fbset
1175 --- a/etc/zsh/completion.d/fbset        Tue Apr 17 01:06:26 2007 +0200
1176 +++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
1177 @@ -1,3 +0,0 @@
1178 -# simple completion for fbset (switch resolution on console)
1179 -  _fbmodes() { compadd 640x480-60 640x480-72 640x480-75 640x480-90 640x480-100 768x576-75 800x600-48-lace 800x600-56 800x600-60 800x600-70 800x600-72 800x600-75 800x600-90 800x600-100 1024x768-43-lace 1024x768-60 1024x768-70 1024x768-72 1024x768-75 1024x768-90 1024x768-100 1152x864-43-lace 1152x864-47-lace 1152x864-60 1152x864-70 1152x864-75 1152x864-80 1280x960-75-8 1280x960-75 1280x960-75-32 1280x1024-43-lace 1280x1024-47-lace 1280x1024-60 1280x1024-70 1280x1024-74 1280x1024-75 1600x1200-60 1600x1200-66 1600x1200-76 }
1180 -  compdef _fbmodes fbset
1181 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/grml-lang
1182 --- a/etc/zsh/completion.d/grml-lang    Tue Apr 17 01:06:26 2007 +0200
1183 +++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
1184 @@ -1,2 +0,0 @@
1185 -  _grml-lang() { compadd at ch de us ; }
1186 -  compdef _grml-lang grml-lang
1187 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/grml-wallpaper
1188 --- a/etc/zsh/completion.d/grml-wallpaper       Tue Apr 17 01:06:26 2007 +0200
1189 +++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
1190 @@ -1,14 +0,0 @@
1191 -  grml-wallpaper() { 
1192 -    if [ -f /usr/share/grml/"$1" ] ; then
1193 -       Esetroot -scale /usr/share/grml/"$1"
1194 -    else
1195 -       Esetroot -scale $*
1196 -    fi
1197 -  }
1198 -
1199 -  _grml-wallpaper() {
1200 -    dirs=(. /usr/share/grml/)
1201 -    _description files expl 'set desktop wallpaper on grml system'
1202 -    _files "$expl[@]" -W dirs -g '*.{jpg,png}(-.)'
1203 -  }
1204 -  compdef _grml-wallpaper grml-wallpaper
1205 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/completion.d/iwconfig
1206 --- a/etc/zsh/completion.d/iwconfig     Tue Apr 17 01:06:26 2007 +0200
1207 +++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
1208 @@ -1,88 +0,0 @@
1209 -_wlan_interfaces() {
1210 -    local intf
1211 -    intf=$(iwconfig |& egrep 'IEEE 802.11[abg]' | cut -d' ' -f1 | tr ' ' \\n )
1212 -    # intf=$( fgrep ': ' < /proc/net/wireless | cut -d: -f1 | tr \\n ' ' | tr -s " \t" )
1213 -    _wanted interfaces expl 'wireless network interface' \
1214 -        compadd ${intf}
1215 -}
1216 -
1217 -_wlan_networks() {
1218 -    networks=()
1219 -    while read LINE
1220 -    do
1221 -        networks+=$LINE
1222 -    done <<(iwlist scanning 2>/dev/null | grep ESSID | sed -e s/'.*"\(.*\)"'/'\1'/ )
1223 -    _wanted -x names expl 'network name' \
1224 -        compadd off any on ${networks}
1225 -}
1226 -
1227 -_iwconfig() {
1228 -  local curcontext="$curcontext" state line expl ret=1
1229 -
1230 -  _arguments -C \
1231 -    '(1 * -)--help[display help information]' \
1232 -    '(1 * -)--version[display version information]' \
1233 -    '1:network interface:_wlan_interfaces' \
1234 -    '*:parameter:->parameters' && ret=0
1235 -
1236 -  if [[ -n "$state" ]]; then
1237 -    local -a arg
1238 -
1239 -    case $words[CURRENT-1] in
1240 -      essid) _wlan_networks;;
1241 -      nwid|domain) _message -e ids 'network id' ;;
1242 -      freq|channel) _message -e channels 'channel or frequency' ;;
1243 -      sens) _message -e levels 'signal level' ;;
1244 -      mode)
1245 -        _wanted modes expl 'operating mode' compadd \
1246 -            Ad-Hoc Managed Master Repeater Secondary Monitor Auto
1247 -      ;;
1248 -      ap) _message -e access-points 'access point' ;;
1249 -      nick*) _message -e names 'nickname' ;;
1250 -      rate|bit*) _message -e bit-rates 'bit rate' ;;
1251 -      rts*|frag*) _message -e sizes 'size' ;;
1252 -      key|enc*) _message -e keys 'key' ;;
1253 -      power)
1254 -        arg=(
1255 -          \*{min,max}'[modifier]'
1256 -      '*off[disable power management]'
1257 -      '*on[enable power management]'
1258 -      '*all[receive all packets]'
1259 -      'unicast[receive unicast packets only]'
1260 -      'multicast[receive multicast and broadcast packets only]'
1261 -        )
1262 -      ;&
1263 -      min|max)
1264 -        _values -S ' ' -w 'parameter' \
1265 -          'period[set the period between wake ups]' \
1266 -      'timeout[set timeout before sleep]' \
1267 -      $arg[@] && ret=0
1268 -      ;;
1269 -      period|timeout) _message -e timeouts 'timeout' ;;
1270 -      txpower) _message -e power 'transmit power' ;;
1271 -      retry) _message -e retries 'retries' ;;
1272 -      *)
1273 -        _values -S ' ' -w 'option' \
1274 -          'essid[set the network name]' \
1275 -      '(nwid domain)'{nwid,domain}'[set the network ID]' \
1276 -      '(freq channel)'{freq,channel}'[set the operating frequency or channel]' \
1277 -      'sens[set the sensitivity threhold]' \
1278 -          'mode[set operating mode]' \
1279 -      'ap[register with given access point]' \
1280 -      '(nick nickname)'nick{,name}'[set the nickname]' \
1281 -      '(rate bit)'{rate,bit}'[set the bitrate]' \
1282 -      'rts[set packet size threshold for sending RTS]' \
1283 -      'frag[set maximum packet fragment size]' \
1284 -      \*{key,enc}'[add encryption key]' \
1285 -      '*power[manipulate power management scheme parameters]' \
1286 -      'txpower[set transmit power]' \
1287 -      'retry[set number of retries]' \
1288 -      'commit[apply changes imediately]' && ret=0
1289 -      ;;
1290 -    esac
1291 -  fi
1292 -
1293 -  return ret
1294 -}
1295 -
1296 -compdef _iwconfig iwconfig
1297 diff -r 1c8cb321138a -r af23f3eb99d9 etc/zsh/functions.d/grml-wallpaper
1298 --- /dev/null   Thu Jan 01 00:00:00 1970 +0000
1299 +++ b/etc/zsh/functions.d/grml-wallpaper        Tue Apr 17 01:27:50 2007 +0200
1300 @@ -0,0 +1,5 @@
1301 +if [ -f /usr/share/grml/"$1" ] ; then
1302 +   Esetroot -scale /usr/share/grml/"$1"
1303 +else
1304 +   Esetroot -scale "$@"
1305 +fi
1306