zsh-workers
 help / color / mirror / code / Atom feed
6201299a2677809b96dc9ddd2c441de817f3b49b blob 885 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 
#compdef ex vi view

local -a args

if _pick_variant vim='(N|)VIM' vi --version; then
  _vim
  return
fi

args=(
  '-c+[execute command on the first file loaded]:command:'
  '-r[recover the named files]'
  '-t+[start editing at the specified tag]:tag:'
  '-w+[set window size to specified number of lines]:lines:'
  '*: :_files'
)

[[ $service != view ]] && args+=(
  '-R[set readonly]'
)

[[ $service == ex ]] && args+=(
  '-s[enter batch mode]'
  '-v[start in vi mode]'
)

case $OSTYPE in
  *bsd*|dragonfly*)
    args+=(
      "-F[don't copy the entire file on start]"
      '-S[set the secure option]'
    )
    [[ $service != ex ]] && args+=(
      '-e[start in ex mode]'
    )
    ;|
  netbsd*)
    args+=(
      '-G[start in gtags mode]'
    )
    [[ $service == vi ]] && args+=(
      '-l[set the lisp and showmatch options]'
    )
    ;;
esac

_arguments -s -S -A '-*' : $args
debug log:

solving 6201299a2 ...
found 6201299a2 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).