Mercurial > hg-stable
changeset 18420:c2792fe15025
zsh_completion: add completion of branch names
author | Johannes Schlatow <johannes@schlatow.name> |
---|---|
date | Thu, 17 Jan 2013 00:54:49 +0100 |
parents | 45bb5df43b81 |
children | e8982483f9dc |
files | contrib/zsh_completion |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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() {