From fcb4f7956799c1e0803c0cb37ee3d17c230d7dcc Mon Sep 17 00:00:00 2001 From: Anton Shestakov Date: Wed, 29 Aug 2018 08:17:31 +0800 Subject: 43348: _hg: check for both -r and --rev --- Completion/Unix/Command/_hg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_hg b/Completion/Unix/Command/_hg index d92112e68..7b72605b3 100644 --- a/Completion/Unix/Command/_hg +++ b/Completion/Unix/Command/_hg @@ -567,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 @@ -795,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 -- cgit 1.4.1