File: _unexpand

package info (click to toggle)
zsh-beta 4.3.6-dev-0%2B20080723-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 14,752 kB
  • ctags: 7,403
  • sloc: ansic: 90,889; sh: 5,568; makefile: 836; perl: 745; awk: 381; sed: 16
file content (26 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (8)
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
#compdef unexpand

local all tabs ret=1
local -a args

all="convert all whitespace, instead of just initial whitespace"
tabs="use comma separated list of tab positions"
args=( 
    "(--all)-a[$all]"
    "(--tabs)-t[$tabs]:tablist"
    "*:file:_files"
)

if _pick_variant gnu="Free Soft" unix --version; then
    args+=(
        "(-a)--all[$all]"
        "--first-only[convert only leading sequences of whitespace]"
        "(-t)--tabs=[$tabs]:tablist"
        "(* -)--help[display help message and exit]"
        "(* -)--version[output version information and exit]"
    )
fi

_arguments "$args[@]" && ret=0

return ret