zsh-workers
 help / color / mirror / code / Atom feed
8a1b4c4c93cfd20d45667476bbf83da8f28221d9 blob 904 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 
#compdef cowsay cowthink

local context state line
typeset -A opt_args

_arguments -s -S -A "-*" \
  "(H mode)-e+[specify cow's eyes]:eye string [oo]" \
  '(H)-f+[specify cowfile]:cowfile:->cowfile' \
  "(H mode)-T+[specify cow's tongue]:tongue string" \
  '(H)-W+[specify width for message word wrap]:wrap column [40]' \
  '(H)-n[no wordwrap]' \
  '*:message' \
  + 'H' \
  '(- *)-h[display usage information]' \
  '(- *)-l[list all cowfiles]' \
  + '(mode)' \
  '(H -e -T)-b[borg mode]' \
  '(H -e -T)-d[dead mode]' \
  '(H -e -T)-g[greedy mode]' \
  '(H -e -T)-p[paranoia mode]' \
  '(H -e -T)-s[stoned mode]' \
  '(H -e -T)-t[tired mode]' \
  '(H -e -T)-w[wired mode]' \
  '(H -e -T)-y[youthful mode]' && return

case "$state" in
  (cowfile)
    _wanted -C option-f-1 cowfiles expl 'cow file' compadd \
      ${=${(f)"$(_call_program cowfiles $words[1] -l)"}:#*\:} || _files -g "*.cow(-.)"
  ;;
esac
debug log:

solving 8a1b4c4c9 ...
found 8a1b4c4c9 in https://git.vuxu.org/mirror/zsh/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).