diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2018-09-03 18:02:49 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2018-09-03 18:02:49 +0200 |
commit | 6e6500bfa9f31b6efce0c0801fcea558aa09b7ba (patch) | |
tree | b2032b9c9a63d7e1db551f937cae04ae062b8fa5 /Completion/Unix/Command/_hg | |
parent | 4614aa489b18ba256fdc7b2c44aa5127c214e665 (diff) | |
parent | b30b89418af2495c0d48a72573f908c4ecf05efd (diff) | |
download | zsh-6e6500bfa9f31b6efce0c0801fcea558aa09b7ba.tar.gz zsh-6e6500bfa9f31b6efce0c0801fcea558aa09b7ba.zip |
Merge tag 'zsh-5.6' into debian
Release 5.6.
Diffstat (limited to 'Completion/Unix/Command/_hg')
-rw-r--r-- | Completion/Unix/Command/_hg | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Completion/Unix/Command/_hg b/Completion/Unix/Command/_hg index 4b88ce4ea..7b72605b3 100644 --- a/Completion/Unix/Command/_hg +++ b/Completion/Unix/Command/_hg @@ -192,13 +192,9 @@ _hg_tags() { # likely merge candidates _hg_mergerevs() { typeset -a heads - local myrev - - heads=(${(f)"$(_hg_cmd heads --template '{rev}\\n')"}) - # exclude own revision - myrev=$(_hg_cmd log -r . --template '{rev}\\n') - heads=(${heads:#$myrev}) + local revset='sort(head() and not ., -rev)' + heads=(${(f)"$(_hg_cmd log -r '$revset' --template '{rev}\\n')"}) (( $#heads )) && _describe -t heads 'heads' heads } @@ -571,7 +567,7 @@ _hg_cmd_diff() { if [[ $state == 'diff_files' ]] then - if [[ -n $opt_args[-r] ]] + if [[ -n ${opt_args[(I)-r|--rev]} ]] then _hg_files && ret=0 else @@ -799,7 +795,7 @@ _hg_cmd_revert() { if [[ $state == 'diff_files' ]] then - if [[ -n $opt_args[-r] ]] + if [[ -n ${opt_args[(I)-r|--rev]} ]] then _hg_files && ret=0 else |