Mercurial > hg
comparison contrib/zsh_completion @ 18421:e8982483f9dc
zsh_completion: add descriptive branch names to head revisions
author | Johannes Schlatow <johannes@schlatow.name> |
---|---|
date | Thu, 17 Jan 2013 01:06:00 +0100 |
parents | c2792fe15025 |
children | 4f1e70ef5a79 |
comparison
equal
deleted
inserted
replaced
18420:c2792fe15025 | 18421:e8982483f9dc |
---|---|
205 # likely merge candidates | 205 # likely merge candidates |
206 _hg_mergerevs() { | 206 _hg_mergerevs() { |
207 typeset -a heads | 207 typeset -a heads |
208 local myrev | 208 local myrev |
209 | 209 |
210 heads=(${(f)"$(_hg_cmd heads --template '{rev}\\n')"}) | 210 heads=(${(f)"$(_hg_cmd heads --template '{rev}:{branch}\\n')"}) |
211 # exclude own revision | 211 # exclude own revision |
212 myrev=$(_hg_cmd log -r . --template '{rev}\\n') | 212 myrev=$(_hg_cmd log -r . --template '{rev}:{branch}\\n') |
213 heads=(${heads:#$myrev}) | 213 heads=(${heads:#$myrev}) |
214 | 214 |
215 (( $#heads )) && _describe -t heads 'heads' heads | 215 (( $#heads )) && _describe -t heads 'heads' heads |
216 | 216 |
217 branches=(${(f)"$(_hg_cmd heads --template '{branch}\\n')"}) | 217 branches=(${(f)"$(_hg_cmd heads --template '{branch}\\n')"}) |