From 9064483b6c73286cd892acd5d30366db14a77371 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 1 Oct 2015 09:47:15 +0100 Subject: 36722: allow git range to complete after ^. Take account of backslash quoting. --- Completion/Unix/Command/_git | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 40a9fb63b..1fcde9015 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5753,7 +5753,14 @@ __git_commit_ranges () { if compset -P '*..(.|)'; then expl=( $* ) else - compset -S '..*' || suf=( -S .. -r '.@~ ^:\t\n\-' ) + if ! compset -S '..*'; then + local match mbegin mend + if [[ ${PREFIX} = (#b)((\\|)\^)* ]]; then + compset -p ${#match[1]} + else + suf=( -S .. -r '.@~ ^:\t\n\-' ) + fi + fi expl=( $* $suf ) fi -- cgit 1.4.1