1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-04 22:51:42 +02:00

36722: allow git range to complete after ^.

Take account of backslash quoting.
This commit is contained in:
Peter Stephenson 2015-10-01 09:47:15 +01:00
parent 8877783b2f
commit 9064483b6c
2 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2015-10-01 Peter Stephenson <p.stephenson@samsung.com>
* 36722: Completion/Unix/Command/_git: allow range to complete
after ^, taking acoount of backslash quoting.
2015-10-01 Mikael Magnusson <mikachu@gmail.com>
* 36709: Doc/Zsh/zle.yo, Functions/Zle/bracketed-paste-url-magic,

View file

@ -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