changeset 39394:09f23b4f1be3

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
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 22 Aug 2018 09:12:22 +0800
parents 56469d475341
children a80b8832720d
files contrib/zsh_completion
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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