diff options
author | Anton Shestakov <av6@dwimlabs.net> | 2018-08-29 08:17:30 +0800 |
---|---|---|
committer | Oliver Kiddle <okiddle@yahoo.co.uk> | 2018-08-29 17:23:04 +0200 |
commit | 06f3bc09c0aad4916198823cfe018950475a9cc0 (patch) | |
tree | 31b3604232f46e5f6a74296e23cdeb07a5e282ae /Completion/Unix/Command | |
parent | 419625bf879c70869552e614e05d84f47c792bdf (diff) | |
download | zsh-06f3bc09c0aad4916198823cfe018950475a9cc0.tar.gz zsh-06f3bc09c0aad4916198823cfe018950475a9cc0.tar.xz zsh-06f3bc09c0aad4916198823cfe018950475a9cc0.zip |
43347: _hg: use revsets for suggestions for hg merge
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r-- | Completion/Unix/Command/_hg | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Completion/Unix/Command/_hg b/Completion/Unix/Command/_hg index 4b88ce4ea..d92112e68 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 } |