contrib/zsh_completion
changeset 18420 c2792fe15025
parent 18419 45bb5df43b81
child 18421 e8982483f9dc
--- a/contrib/zsh_completion	Thu Jan 17 01:55:50 2013 +0100
+++ b/contrib/zsh_completion	Thu Jan 17 00:54:49 2013 +0100
@@ -213,6 +213,13 @@
   heads=(${heads:#$myrev})
 
   (( $#heads )) && _describe -t heads 'heads' heads
+
+  branches=(${(f)"$(_hg_cmd heads --template '{branch}\\n')"})
+  # exclude own revision
+  myrev=$(_hg_cmd log -r . --template '{branch}\\n')
+  branches=(${branches:#$myrev})
+
+  (( $#branches )) && _describe -t branches 'branches' branches
 }
 
 _hg_files() {