about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-04-11 18:16:09 +0000
committerClint Adams <clint@users.sourceforge.net>2005-04-11 18:16:09 +0000
commit464c0a1a12f566d879166641e6379d226eedb9e9 (patch)
treea68738cd4edc7f1ffe066876fd0d95784c6f8356
parentb0fd78f234b1dcfb4c115d492cb8a7a3ba738309 (diff)
downloadzsh-464c0a1a12f566d879166641e6379d226eedb9e9.tar.gz
zsh-464c0a1a12f566d879166641e6379d226eedb9e9.tar.xz
zsh-464c0a1a12f566d879166641e6379d226eedb9e9.zip
* 21132: Completion/Unix/Type/_pdf, Completion/X/Command/_xpdf:
 complete xpdf options, and also complete .pdf.bz2 files when
 completing compressed PDF files.
-rw-r--r--ChangeLog6
-rw-r--r--Completion/Unix/Type/_pdf16
2 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d93d3581..f2c6a4096 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-04-11  Clint Adams  <clint@zsh.org>
+
+	* 21132: Completion/Unix/Type/_pdf, Completion/X/Command/_xpdf:
+        complete xpdf options, and also complete .pdf.bz2 files when
+	completing compressed PDF files.
+
 2005-04-10  Clint Adams  <clint@zsh.org>
 
 	* unposted: config.guess, config.sub: update to 2005-03-24 and
diff --git a/Completion/Unix/Type/_pdf b/Completion/Unix/Type/_pdf
new file mode 100644
index 000000000..95cda4dfd
--- /dev/null
+++ b/Completion/Unix/Type/_pdf
@@ -0,0 +1,16 @@
+#compdef pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext pdfopt pdffonts kpdf
+
+local expl ext=''
+
+# ghostscript:
+#  pdf2dsc pdf2ps pdfopt
+# xpdf:
+#  pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf pdffonts
+
+if [[ "$1" == '-z' ]]; then
+  ext='(|.gz|.bz2|.Z)'
+  shift
+fi
+
+_description files expl 'PDF file'
+_files "$@" "$expl[@]" -g "*.(#i)pdf$ext(-.)"