zsh-workers
 help / color / mirror / code / Atom feed
13f6ce835adb4898fa61f833691632be4cdc6b2d blob 945 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
 
#compdef unexpand gunexpand expand gexpand

local all tabs
local -a args

all="convert all whitespace, instead of just initial whitespace"
tabs="[use comma separated list of tab positions]:list of tab positions"

if _pick_variant gnu="Free Soft" unix --version; then
  if [[ $service = *un* ]]; then
    args=(
      "(-a --help --version)--all[$all]"
      '(--help --version)--first-only[convert only leading sequences of whitespace]'
    )
  else
    args=(
      '(-i --initial --help --version)'{-i,--initial}"[don't convert tabs after non blanks]"
    )
  fi

  args+=(
    "(-t --help --version)--tabs=${tabs}"
    '(* -)--help[display usage information]'
    '(* -)--version[display version information]'
  )
elif [[ $OSTYPE = (*bsd*|dragonfly*|darwin*) ]]; then
  args=( -A "-*" )
fi
[[ $service = *un* ]] && args+=(  "(--all --help --version)-a[$all]" )

_arguments -s -S "$args[@]" \
  "(--tabs --help)-t+${tabs}" \
  '*:file:_files'
debug log:

solving 13f6ce835 ...
found 13f6ce835 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).