about summary refs log tree commit diff
path: root/Completion/Unix/Type/_pdf
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Type/_pdf')
-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..30d03e397
--- /dev/null
+++ b/Completion/Unix/Type/_pdf
@@ -0,0 +1,16 @@
+#compdef acroread pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf pdfopt pdffonts
+
+local expl ext=''
+
+# ghostscript:
+#  pdf2dsc pdf2ps pdfopt
+# xpdf:
+#  pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf pdffonts
+
+if [[ "$1" == '-z' ]]; then
+  ext='(|.gz|.Z)'
+  shift
+fi
+
+_description files expl 'PDF file'
+_files "$@" "$expl[@]" -g "*.(#i)pdf$ext"