Mercurial > dotfiles
diff .zfun/_hg @ 270:1e2125a577da
_hg: import updated version from upstream
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Mon, 12 Dec 2011 11:47:26 -0600 |
parents | c451e42b3ecc |
children | 268587bbfc2b |
line wrap: on
line diff
--- a/.zfun/_hg +++ b/.zfun/_hg @@ -165,6 +165,7 @@ typeset -A _hg_cmd_globals _hg_labels() { _hg_tags "$@" _hg_bookmarks "$@" + _hg_branches "$@" } _hg_tags() { @@ -191,6 +192,17 @@ typeset -A _hg_cmd_globals (( $#bookmarks )) && _describe -t bookmarks 'bookmarks' bookmarks } +_hg_branches() { + typeset -a branches + local branch + + _hg_cmd branches | while read branch + do + branches+=(${branch/ # [0-9]#:*}) + done + (( $#branches )) && _describe -t branches 'branches' branches +} + # likely merge candidates _hg_mergerevs() { typeset -a heads @@ -360,8 +372,8 @@ typeset -A _hg_cmd_globals '(--help -h)'{-h,--help}'[display help and exit]' '--debug[debug mode]' '--debugger[start debugger]' - '--encoding[set the charset encoding (default: UTF8)]' - '--encodingmode[set the charset encoding mode (default: strict)]' + '--encoding[set the charset encoding]' + '--encodingmode[set the charset encoding mode]' '--lsprof[print improved command execution profile]' '--traceback[print traceback on exception]' '--time[time how long the command takes]' @@ -617,6 +629,7 @@ typeset -A _hg_cmd_globals '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \ '(--patch -p)'{-p,--patch}'[show patch]' \ '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_labels' \ + '(--branch -b)'{-b+,--branch}'[show changesets within the given named branch]:branch:_hg_branches' \ '*:files:_hg_files' }