[PATCH] improving zsh completion by adding descriptive branch names to head revision numbers

Johannes Schlatow johannes at schlatow.name
Wed Jan 16 19:00:34 CST 2013


# HG changeset patch
# User Johannes Schlatow <johannes at schlatow.name>
# Date 1358381160 -3600
# Node ID ec4fc4474af7dcedd182c4f9153884f4e852e089
# Parent  6d851c829427e8f85f5640c8c1333715fd7b1f37
zsh_completion: add descriptive branch names to head revisions

diff -r 6d851c829427 -r ec4fc4474af7 contrib/zsh_completion
--- a/contrib/zsh_completion    Thu Jan 17 00:54:49 2013 +0100
+++ b/contrib/zsh_completion    Thu Jan 17 01:06:00 2013 +0100
@@ -208,9 +208,9 @@
   typeset -a heads
   local myrev

-  heads=(${(f)"$(_hg_cmd heads --template '{rev}\\n')"})
+  heads=(${(f)"$(_hg_cmd heads --template '{rev}:{branch}\\n')"})
   # exclude own revision
-  myrev=$(_hg_cmd log -r . --template '{rev}\\n')
+  myrev=$(_hg_cmd log -r . --template '{rev}:{branch}\\n')
   heads=(${heads:#$myrev})

   (( $#heads )) && _describe -t heads 'heads' heads


More information about the Mercurial-devel mailing list