# HG changeset patch # User Anton Shestakov # Date 1534900342 -28800 # Node ID 09f23b4f1be3ebe211e88fd539cd2afecff69f89 # Parent 56469d475341084dfd6c6571e45c35040f167fe9 zsh_completion: handle --rev as well as -r for diff and revert Completion for hg diff and revert should suggest all files in context of a non-current revision. The script used to look only for `-r foo`, and now it also understands `--rev foo`. Differential Revision: https://phab.mercurial-scm.org/D4427 diff -r 56469d475341 -r 09f23b4f1be3 contrib/zsh_completion --- a/contrib/zsh_completion Sun Aug 26 16:42:28 2018 -0400 +++ b/contrib/zsh_completion Wed Aug 22 09:12:22 2018 +0800 @@ -624,7 +624,7 @@ if [[ $state == 'diff_files' ]] then - if [[ -n $opt_args[-r] ]] + if [[ -n ${opt_args[(I)-r|--rev]} ]] then _hg_files && ret=0 else @@ -870,7 +870,7 @@ if [[ $state == 'revert_files' ]] then - if [[ -n $opt_args[-r] ]] + if [[ -n ${opt_args[(I)-r|--rev]} ]] then _hg_files && ret=0 else