File: _elm

package info (click to toggle)
zsh-beta 4.1.0-dev-4-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 10,064 kB
  • ctags: 6,159
  • sloc: ansic: 73,617; sh: 4,600; makefile: 630; perl: 623; awk: 293; sed: 16
file content (33 lines) | stat: -rw-r--r-- 1,002 bytes parent folder | download | duplicates (2)
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
32
33
#compdef elm

local curcontext="$curcontext" state line expl suf

_arguments -C -s \
  '::recipient:->userhost' \
  '-a[use the arrow pointer regardless]' \
  '-A+[attach file]:file attachment:_files' \
  '-c[check the given aliases only]:*:alias' \
  '-d+[set debug level]:debug level' \
  '-f+[specify mailbox to load]:mailbox: _mailboxes' \
  '-h[display help]' \
  '-i+[specify file to include in message]:include file:_files' \
  '-m[turn off menu, using more of the screen]' \
  '-s+[specify a subject]:subject:' \
  "-t[don't use termcap/terminfo ti/te entries]" \
  '-V[enable sendmail voyeur mode]' \
  '-v[display elm version]' \
  '-w[write .elm/elmrc]' \
  '-z[start only if new messages]' && return 0

if [[ "$state" = userhost ]]; then
  if compset -P '*@'; then
    _description hosts expl 'remote host name'
    _hosts "$expl[@]" && return 0
  else
    compset -S '@*' || suf='@'
    _description users expl 'login name'
    _users "$expl[@]" -q -S "$suf" && return 0
  fi
fi

return 1