Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[Patch] Some more completion stuff



Hi all,

please see attached files. 1 & 2 are trivial. 3 adds completion for
a few programs which handle .dvi files.


Richard
From 6df3c7a60d2a8a7bdda8a93165ac180209c2f93b Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih@xxxxxxxxxxxxx>
Date: Sat, 27 Dec 2008 01:35:39 +0100
Subject: [PATCH] Add .bz2 support for _ps completion

---
 Completion/Unix/Type/_ps |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Type/_ps b/Completion/Unix/Type/_ps
index 6caddd9..792a39b 100644
--- a/Completion/Unix/Type/_ps
+++ b/Completion/Unix/Type/_ps
@@ -6,7 +6,7 @@ local expl ext=''
 #  ps2epsi ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr ps2ps
 
 if [[ "$1" == '-z' ]]; then
-  ext='(|.gz|.Z)'
+  ext='(|.bz2|.gz|.Z)'
   shift
 fi
 
-- 
1.5.6.5

From 38501ee84b3c106a93733f19248378e10f07ec45 Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih@xxxxxxxxxxxxx>
Date: Sat, 27 Dec 2008 01:43:57 +0100
Subject: [PATCH] Change order of extensions to alphabetical

---
 Completion/Unix/Type/_pdf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Type/_pdf b/Completion/Unix/Type/_pdf
index 9b51277..994f08f 100644
--- a/Completion/Unix/Type/_pdf
+++ b/Completion/Unix/Type/_pdf
@@ -12,7 +12,7 @@ local expl ext=''
 #  okular
 
 if [[ "$1" == '-z' ]]; then
-  ext='(|.gz|.bz2|.Z)'
+  ext='(|.bz2|.gz|.Z)'
   shift
 fi
 
-- 
1.5.6.5

From fda4ea61f2e224428e3b30fd591e16c173cceef3 Mon Sep 17 00:00:00 2001
From: Richard Hartmann <richih@xxxxxxxxxxxxx>
Date: Sat, 27 Dec 2008 02:49:14 +0100
Subject: [PATCH] Introduce _dvi completion

---
 Completion/Unix/Type/.distfiles |    1 +
 Completion/Unix/Type/_dvi       |   13 +++++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 Completion/Unix/Type/_dvi

diff --git a/Completion/Unix/Type/.distfiles b/Completion/Unix/Type/.distfiles
index ecf0867..14a9494 100644
--- a/Completion/Unix/Type/.distfiles
+++ b/Completion/Unix/Type/.distfiles
@@ -10,6 +10,7 @@ _diff_options
 _dir_list
 _directories
 _domains
+_dvi
 _email_addresses
 _file_systems
 _files
diff --git a/Completion/Unix/Type/_dvi b/Completion/Unix/Type/_dvi
new file mode 100644
index 0000000..5edec40
--- /dev/null
+++ b/Completion/Unix/Type/_dvi
@@ -0,0 +1,13 @@
+#compdef dvi2fax dvibook dviconcat dvicopy dvihp dvilj dvilj2p dvilj4 dvilj4l dvilj6 dvipdf dvipdfm dvipdfmx dvipdft dvipos dvips dvired dviselect dvitodvi dvitype okular
+
+local expl ext=''
+
+# Tex tools:
+#  dvi2fax dvibook dviconcat dvicopy dvihp dvilj dvilj2p dvilj4 dvilj4l
+#  dvilj6 dvipdf dvipdfm dvipdfmx dvipdft dvipos dvips dvired dviselect
+#  dvitodvi dvitype
+# KDE 4:
+#  okular
+
+_description files expl 'DVI file'
+_files "$@" "$expl[@]" -g "*.(#i)dvi(-.)"
-- 
1.5.6.5



Messages sorted by: Reverse Date, Date, Thread, Author