##// END OF EJS Templates
contrib: some support for named branches in zsh_completion (issue2988)...
Ben Hockey -
r15100:a051f8a6 default
parent child Browse files
Show More
@@ -165,6 +165,7 b' typeset -A _hg_cmd_globals'
165 165 _hg_labels() {
166 166 _hg_tags "$@"
167 167 _hg_bookmarks "$@"
168 _hg_branches "$@"
168 169 }
169 170
170 171 _hg_tags() {
@@ -191,6 +192,17 b' typeset -A _hg_cmd_globals'
191 192 (( $#bookmarks )) && _describe -t bookmarks 'bookmarks' bookmarks
192 193 }
193 194
195 _hg_branches() {
196 typeset -a branches
197 local branch
198
199 _hg_cmd branches | while read branch
200 do
201 branches+=(${branch/ # [0-9]#:*})
202 done
203 (( $#branches )) && _describe -t branches 'branches' branches
204 }
205
194 206 # likely merge candidates
195 207 _hg_mergerevs() {
196 208 typeset -a heads
@@ -617,6 +629,7 b' typeset -A _hg_cmd_globals'
617 629 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
618 630 '(--patch -p)'{-p,--patch}'[show patch]' \
619 631 '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_labels' \
632 '(--branch -b)'{-b+,--branch}'[show changesets within the given named branch]:branch:_hg_branches' \
620 633 '*:files:_hg_files'
621 634 }
622 635
General Comments 0
You need to be logged in to leave comments. Login now