summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Completion/User/_gv35
-rw-r--r--Completion/User/_pdf17
-rw-r--r--Completion/User/_ps15
-rw-r--r--Completion/User/_pspdf14
5 files changed, 78 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 318922bec..998feb80b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2000-08-23  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 12692: Alexandre: 12691; 12692: Completion/User/_gv,
+	Completion/User/_pdf, Completion/User/_ps, Completion/User/_pspdf:
+ 	complete compressed files for gv; improve results from _pspdf
+	
 2000-08-21  Sven Wischnowsky  <wischnow@zsh.org>
 
 	* 12682: Completion/Builtins/_zmodload: use return value
diff --git a/Completion/User/_gv b/Completion/User/_gv
index 887224a0f..cc6e646d7 100644
--- a/Completion/User/_gv
+++ b/Completion/User/_gv
@@ -1,14 +1,39 @@
 #compdef gv gview
 
 _xt_arguments \
-  -{,no}{safer,quiet,center,swap,antialias,dsc,eof,pixmap,watch,resize} \
-  -{monochrome,grayscale,color,portrait,landscape,upsidedown,seascape,h,help,v,spartan} \
-
+  '(-nosafer)-safer' \
+  '(-safer)-nosafer' \
+  '(-noquiet)-quiet' \
+  '(-quiet)-noquiet' \
+  '(-nocenter)-center' \
+  '(-center)-nocenter' \
+  '(-noswap)-swap' \
+  '(-swap)-noswap' \
+  '(-noantialias)-antialias' \
+  '(-antialias)-noantialias' \
+  '(-nodsc)-dsc' \
+  '(-dsc)-nodsc' \
+  '(-noeof)-eof' \
+  '(-eof)-noeof' \
+  '(-nopixmap)-pixmap' \
+  '(-pixmap)-nopixmap' \
+  '(-nowatch)-watch' \
+  '(-watch)-nowatch' \
+  '(-noresize)-resize' \
+  '(-resize)-noresize' \
+  '(-grayscale -color)-monochrome' \
+  '(-monochrome -color)-grayscale' \
+  '(-grayscale -color)-monochrome' \
+  '(-landscape -seascape -upsidedown)-portrait' \
+  '(-portrait -seascape -upsidedown)-landscape' \
+  '(-portrait -landscape -upsidedown)-seascape' \
+  '(-portrait -landscape -seascape)-upsidedown' \
+  -{h,help,v,spartan} \
   '-arguments:ghostscript arguments:' \
   '-page:label of first page:' \
   '-media:page size:(Letter Legal Statement Tabloid Ledger Folio Quarto 10x14 Executive A3 A4 A5 B4 B5)' \
   '-scale:scale entry:' \
   '-scalebase:scale base:' \
   '-ad:resource file:_files' \
-  '-style:resource file:_files'
-  '*:file:_pspdf'
+  '-style:resource file:_files' \
+  '*:file: _pspdf -z'
diff --git a/Completion/User/_pdf b/Completion/User/_pdf
index 7d7756c3e..de373a355 100644
--- a/Completion/User/_pdf
+++ b/Completion/User/_pdf
@@ -1,3 +1,16 @@
-function acroread
+#compdef acroread pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext xpdf
 
-_files -g '*.(pdf|PDF)'
+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"
diff --git a/Completion/User/_ps b/Completion/User/_ps
index 6bc0643b2..57c419ba3 100644
--- a/Completion/User/_ps
+++ b/Completion/User/_ps
@@ -1,3 +1,14 @@
-#defcomp  gs ghostview gview psnup psselect pswrap pstops pstruct lpr
+#compdef ps2epsi ps2pdf psmulti pswrap
 
-_files -g '*([pP][sS]|eps)'
+local expl ext=''
+
+# ghostscript:
+#  ps2epsi ps2pdf
+
+if [[ "$1" == '-z' ]]; then
+  ext='(|.gz|.Z)'
+  shift
+fi
+
+_description files expl 'PostScript file'
+_files "$@" "$expl[@]" -g "*.(#i)(ps|eps)$ext"
diff --git a/Completion/User/_pspdf b/Completion/User/_pspdf
new file mode 100644
index 000000000..93856164c
--- /dev/null
+++ b/Completion/User/_pspdf
@@ -0,0 +1,14 @@
+#compdef gsbj gsdj gsdj500 gslj gslp gsnd ps2ascii ghostview mgv ggv pstoedit pstotgif
+
+local expl ext
+
+# ghostscript:
+#  gs gsbj gsdj gsdj500 gslj gslp gsnd ps2ascii
+
+if [[ "$1" == '-z' ]]; then
+  ext='(|.gz|.Z)'
+  shift
+fi
+
+_description files expl 'PostScript or PDF file'
+_files "$@" "$expl[@]" -g "*.(#i)(pdf|ps|eps)$ext"