summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2018-08-07 16:45:31 +0200
committerDaniel Shahaf <d.s@daniel.shahaf.name>2018-08-12 19:37:47 +0000
commit99fd8c0fe97b6e481ea41c16c753f3033aa1b47a (patch)
tree9f2397ad088adbb91e7357e361e57df1c12b497c /Completion/Unix/Command
parentf58b35bf88722b9e9e420fa86f1a0a96f98515d9 (diff)
downloadzsh-99fd8c0fe97b6e481ea41c16c753f3033aa1b47a.tar.gz
zsh-99fd8c0fe97b6e481ea41c16c753f3033aa1b47a.tar.xz
zsh-99fd8c0fe97b6e481ea41c16c753f3033aa1b47a.zip
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>`.
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_git2
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 38b872ea0..eac0c8476 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -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