1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-17 22:31:12 +01:00
zsh/Completion/User/_a2ps

40 lines
1.4 KiB
Text
Raw Normal View History

1999-04-15 20:25:40 +02:00
#compdef a2ps
1999-04-15 20:17:36 +02:00
1999-04-15 20:20:19 +02:00
# This is for the GNU version of a2ps.
1999-04-15 20:17:36 +02:00
1999-04-15 20:20:19 +02:00
if [[ "$words[1]" != "$_a2ps_cache_cmd" ]]; then
local descr
_a2ps_cache_cmd="$words[1]"
2000-02-28 11:00:25 +01:00
descr=( "${(@)${(f@)$(_call features LC_ALL=C $words[1] --list=features)//
1999-04-15 20:20:19 +02:00
/ }:#}" )
_a2ps_cache_values=(
1999-09-30 00:52:24 +02:00
"${descr[(r)Known [Ss]tyle [Ss]heets*]#* }"
"${descr[(r)Known [Ee]ncodings*]#* }"
"${descr[(r)Known [Mm]edia*]#* }"
"${descr[(r)Known [Pp]rologues*]#* }"
1999-04-15 20:20:19 +02:00
"${descr[(r)Known PostScript Printer Descriptions*]#* }"
1999-09-30 00:52:24 +02:00
"${descr[(r)Known [Oo]utput [Dd]estination*]#* }"
"${descr[(r)Known [Uu]ser [Oo]ptions*]#* }"
1999-04-15 20:20:19 +02:00
"${descr[(r)Known Variables*]#* }"
)
1999-04-15 20:17:36 +02:00
fi
1999-04-15 20:20:19 +02:00
2000-01-17 19:17:42 +01:00
_arguments '*:input file:_files' -- \
1999-08-30 12:08:13 +02:00
'*\*:toggle:(yes no)' \
'*=DIRECTION:direction:(rows columns)' \
'*=TYPE:type:(r n nr rn any)' \
'--highlight-level*:highlight:(none normal heavy)' \
'--version-control*:version control:(none off t numbered nil
existing never simple)' \
"--pretty-print*::style:(${_a2ps_cache_values[1]})" \
"--encoding*:encoding:(${_a2ps_cache_values[2]})" \
"--medium*::medium:(${_a2ps_cache_values[3]})" \
"--prologue*::prologue:(${_a2ps_cache_values[4]})" \
"--ppd*::printer description:(${_a2ps_cache_values[5]})" \
"--printer*::printer:(${_a2ps_cache_values[6]})" \
"--user-option*::user option:(${_a2ps_cache_values[7]})" \
"--variable*::variable:(${_a2ps_cache_values[8]})"