about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/Unix/Type/_pdf16
1 files changed, 16 insertions, 0 deletions
diff --git a/Completion/Unix/Type/_pdf b/Completion/Unix/Type/_pdf
new file mode 100644
index 000000000..de373a355
--- /dev/null
+++ b/Completion/Unix/Type/_pdf
@@ -0,0 +1,16 @@
+#compdef acroread pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf
+
+local expl ext=''
+
+# ghostscript:
+#  pdf2dsc pdf2ps
+# xpdf:
+#  pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf
+
+if [[ "$1" == '-z' ]]; then
+  ext='(|.gz|.Z)'
+  shift
+fi
+
+_description files expl 'PDF file'
+_files "$@" "$expl[@]" -g "*.(#i)pdf$ext"