summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:44:39 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:44:39 +0000
commiteea692f24d9b0c604ce7ab5dfc1fc1af981e1632 (patch)
tree34c016e8ab1d34a8ac86c6571955ecdb8a0458d8 /Completion
parent3b3e3c3e1039b3634fcf6a7b6dd1f85ae4029347 (diff)
downloadzsh-eea692f24d9b0c604ce7ab5dfc1fc1af981e1632.tar.gz
zsh-eea692f24d9b0c604ce7ab5dfc1fc1af981e1632.tar.xz
zsh-eea692f24d9b0c604ce7ab5dfc1fc1af981e1632.zip
moved from Completion/User/_a2ps
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_a2ps39
1 files changed, 39 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_a2ps b/Completion/Unix/Command/_a2ps
new file mode 100644
index 000000000..0bbfba2b2
--- /dev/null
+++ b/Completion/Unix/Command/_a2ps
@@ -0,0 +1,39 @@
+#compdef a2ps
+
+# This is for the GNU version of a2ps.
+
+if [[ "$words[1]" != "$_a2ps_cache_cmd" ]]; then
+  local descr
+
+  _a2ps_cache_cmd="$words[1]"
+
+  descr=( "${(@)${(f@)$(_call_program features LC_ALL=C $words[1] --list=features)//
+ /	}:#}" )
+
+  _a2ps_cache_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]utput [Dd]estination*]#*	}"
+      "${descr[(r)Known [Uu]ser [Oo]ptions*]#*	}"
+      "${descr[(r)Known Variables*]#*	}"
+  )
+fi
+
+_arguments '*:input file:_files' -- \
+           '*\*: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]})"