aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-08-22 12:57:01 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-08-22 12:57:01 +0000
commitebcd3c0da3f0bd8796a2da227f8aa3693d12d74c (patch)
tree979e95c5aa78034ce4f46cfefd82097b2d3f20a4
parent0c534a237876f4103bdc4c106b3096899f930dbe (diff)
downloadzsh-ebcd3c0da3f0bd8796a2da227f8aa3693d12d74c.tar.gz
zsh-ebcd3c0da3f0bd8796a2da227f8aa3693d12d74c.tar.xz
zsh-ebcd3c0da3f0bd8796a2da227f8aa3693d12d74c.zip
18956: update a2ps completion for a2ps 4.13
-rw-r--r--ChangeLog4
-rw-r--r--Completion/Unix/Command/_a2ps53
2 files changed, 57 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 31491dd91..0aead301e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-21 Oliver Kiddle <opk@zsh.org>
+
+ * 18956: Completion/Unix/Command/_a2ps: update for a2ps 4.13
+
2003-08-20 Oliver Kiddle <opk@zsh.org>
* 18949: Completion/Unix/Command/_du,
diff --git a/Completion/Unix/Command/_a2ps b/Completion/Unix/Command/_a2ps
new file mode 100644
index 000000000..d4e9ee469
--- /dev/null
+++ b/Completion/Unix/Command/_a2ps
@@ -0,0 +1,53 @@
+#compdef a2ps
+
+# This is for the GNU version of a2ps.
+
+if [[ "$words[1]" != "$_cache_a2ps_cmd" ]]; then
+ local descr
+
+ _cache_a2ps_cmd="$words[1]"
+
+ descr=( "${(@)${(f@)$(_call_program features LC_ALL=C $words[1] --list=features)//
+ / }:#}" )
+
+ _cache_a2ps_values=(
+ "${descr[(r)Known [Ss]tyle [Ss]heets*]#* }"
+ "${descr[(r)Known [Ee]ncodings*]#* }"
+ "${descr[(r)Known [Mm]edia*]#* }"
+ "${descr[(r)Known [Pp]rologues*]#* }"
+ "${descr[(r)Known PostScript Printer Descriptions*]#* }"
+ "${descr[(r)Known [Oo]utputs*]#* }"
+ "${descr[(r)Known [Uu]ser [Oo]ptions*]#* }"
+ "${descr[(r)Known Variables*]#* }"
+ )
+fi
+
+_arguments \
+ '(-E --pretty-print=)'{-E-,--pretty-print=}"[enable pretty-printing]::language:(${_cache_a2ps_values[1]})" \
+ \*{-D+,--define=}"[set or unset variable]:variable:(${_cache_a2ps_values[8]})" \
+ '(-d -P --printer)'{-P,--printer=}"[send output to printer]:printer:(${_cache_a2ps_values[6]})" \
+ '(-A --file-align)'{-A,--file-align=}'[specify alignment of separate files]:mode:(virtual rank page sheet)' \
+ '(-a --pages)'{-a-,--pages=}'[select pages to print]:page range' \
+ '(-q --quiet --silent -v --verbose)'{-q,--quiet,--silent}'[quiet output]' \
+ '(-q --quiet --silent -v --verbose)'{-v-,--verbose=}'[verbose output]:level' \
+ '(-b --header)'{-b-,--header=}'[set the page header]:text' \
+ '(-g)--highlight-level=:highlight:(none normal heavy)' \
+ '--list=:topic:(features delegations encodings media prologues printers style-sheets user-options variables)' \
+ "--user-option=:user option:(${_cache_a2ps_values[7]})" \
+ {-M,--medium=}":medium:(${_cache_a2ps_values[3]})" \
+ "--ppd=::printer description:(${_cache_a2ps_values[5]})" \
+ '--statusdict=:statusdict definition' \
+ '--setpagedevice=:page device definition' \
+ '--margin=:margin size (PostScript points)' \
+ '--toc=:format' \
+ --{{center,left,right}-title.underlay,{,left-,right-}footer}'=:text' \
+ '*:input file:_files' -- \
+ '*\*:toggle:(yes no)' \
+ '*=DIRECTION:direction:(rows columns)' \
+ '*=TYPE:type:((r\:CR mac\:CR unix\:LF n\:LF nr\:LFCR rn\:CRLF pc\:CRLF any auto))' \
+ '--version-control*:version control:(none off t numbered nil existing never simple)' \
+ '--strip-level*:strip level:((0\:everything\ is\ printed 1\:regular\ comments\ are\ not\ printed 2\:strong\ comments\ are\ not\ printed 3\:no\ comment\ is\ printed))' \
+ '--sides=*:mode:(simplex duplex tumble)' \
+ '--non-printable-format*:format:(caret space question-mark octal hexa emacs)' \
+ "--encoding*:encoding:(${_cache_a2ps_values[2]})" \
+ "--prologue*::prologue:(${_cache_a2ps_values[4]})"