diff options
author | Peter Stephenson <pws@zsh.org> | 2015-10-01 09:47:15 +0100 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2015-10-01 09:47:15 +0100 |
commit | 9064483b6c73286cd892acd5d30366db14a77371 (patch) | |
tree | 72bebcd163ca05b02370c7dd5eef8f13213dc22c /Completion/Unix | |
parent | 8877783b2f98de67144f403e0146b6d201e98ba3 (diff) | |
download | zsh-9064483b6c73286cd892acd5d30366db14a77371.tar.gz zsh-9064483b6c73286cd892acd5d30366db14a77371.tar.xz zsh-9064483b6c73286cd892acd5d30366db14a77371.zip |
36722: allow git range to complete after ^.
Take account of backslash quoting.
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_git | 9 |
1 files changed, 8 insertions, 1 deletions
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 |