1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-25 05:10:28 +02:00

unposted (PR #26): __git_files: fix double quotation of star

This fixes the double quote introduced by aa160fc8, so that the end result of
the parameter expansion is $pref followed by \* (a quoted star), meaning
`git ls-files` gets a literal star, not an expanded list of matching files, as
was intended in commit cc7437bf.

Fixes completion of `git add ../<TAB>`.
This commit is contained in:
Marc Cornellà 2018-08-07 16:45:31 +02:00 committed by Daniel Shahaf
parent f58b35bf88
commit 99fd8c0fe9
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2018-08-12 Marc Cornellà <marc.cornella@live.com>
* unposted (PR #26): Completion/Unix/Command/_git: __git_files:
fix double quotation of star
2018-08-09 Peter Stephenson <p.stephenson@samsung.com>
* 43264: Src/params.c, Test/D04parameter.ztst:

View file

@ -6812,7 +6812,7 @@ __git_files () {
local pref=$gitcdup$gitprefix$PREFIX
# First allow ls-files to pattern-match in case of remote repository
files=(${(0)"$(_call_program files git ls-files -z --exclude-standard ${(q)opts} -- ${(q)${pref:+$pref\\\*}:-.} 2>/dev/null)"})
files=(${(0)"$(_call_program files git ls-files -z --exclude-standard ${(q)opts} -- ${(q)${pref:+$pref\*}:-.} 2>/dev/null)"})
__git_command_successful $pipestatus || return
# If ls-files succeeded but returned nothing, try again with no pattern