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

PATCH: _quilt improvements



Stolen from Adeodato Simó.

Index: Completion/Unix/Command/_quilt
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_quilt,v
retrieving revision 1.2
diff -u -r1.2 _quilt
--- Completion/Unix/Command/_quilt	9 Dec 2005 19:25:03 -0000	1.2
+++ Completion/Unix/Command/_quilt	11 Feb 2006 22:32:41 -0000
@@ -7,4 +7,24 @@
   ':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



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