about summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2006-02-11 22:39:28 +0000
committerClint Adams <clint@users.sourceforge.net>2006-02-11 22:39:28 +0000
commit492943ac716bf63bb1e9e3b3ca625139fe34727d (patch)
tree14e12c8a702a525009e50c9fe96c69fb247053bd /Completion/Unix/Command
parentba30034faf3387f17cd217f01a8b33028fffbbbb (diff)
downloadzsh-492943ac716bf63bb1e9e3b3ca625139fe34727d.tar.gz
zsh-492943ac716bf63bb1e9e3b3ca625139fe34727d.tar.xz
zsh-492943ac716bf63bb1e9e3b3ca625139fe34727d.zip
22234: Adeodato Simó's quilt completion improvements.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_quilt22
1 files changed, 21 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_quilt b/Completion/Unix/Command/_quilt
index 8c34c49b1..a2fd799a6 100644
--- a/Completion/Unix/Command/_quilt
+++ b/Completion/Unix/Command/_quilt
@@ -7,4 +7,24 @@ _arguments \
   ':quilt command:(add files import previous setup annotate fold mail push
     snapshot applied fork new refresh top delete graph next remove unapplied
     diff grep patches rename upgrade edit header pop series)' \
-  '*::file:_files'
+  '*::subcmd:->subcmd' && return 0
+
+case "$state" in
+    (subcmd)
+
+  case "$words[1]" in
+      (applied|delete|files|graph|header|next|previous|refresh|unapplied)
+      	_wanted -V 'patches' expl 'patch' compadd ${(f)"$(quilt series)"}
+	;;
+      (push)
+    	_wanted -V 'unapplied patches' expl 'patch' compadd ${(f)"$(quilt unapplied)"}
+    	;;
+      (pop)
+    	_wanted -V 'applied patches' expl 'patch' compadd ${(f)"$(quilt applied)"}
+    	;;
+      (*)
+    	_files
+    	;;
+  esac
+  ;;
+esac