diff options
| author | Bart Schaefer <schaefer@zsh.org> | 2024-05-24 19:22:44 -0700 |
|---|---|---|
| committer | Bart Schaefer <schaefer@zsh.org> | 2024-05-24 19:22:44 -0700 |
| commit | 7f196de9d7f1034a6a8cc7730280f21f7eb0a7f3 (patch) | |
| tree | 313d56e25fadcbcef6b8e191f1279c07ed240432 | |
| parent | 52895: Partial revert of 44274 which broke _baudrates (diff) | |
| download | zsh-7f196de9d7f1034a6a8cc7730280f21f7eb0a7f3.tar zsh-7f196de9d7f1034a6a8cc7730280f21f7eb0a7f3.tar.gz zsh-7f196de9d7f1034a6a8cc7730280f21f7eb0a7f3.tar.bz2 zsh-7f196de9d7f1034a6a8cc7730280f21f7eb0a7f3.tar.lz zsh-7f196de9d7f1034a6a8cc7730280f21f7eb0a7f3.tar.xz zsh-7f196de9d7f1034a6a8cc7730280f21f7eb0a7f3.tar.zst zsh-7f196de9d7f1034a6a8cc7730280f21f7eb0a7f3.zip | |
52904: Improve quoting of paths passed via _call_program to "git ls-files"
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Completion/Unix/Command/_git | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2024-05-24 Bart Schaefer <schaefer@zsh.org> + + * 52904: Completion/Unix/Command/_git: Improve quoting of paths + passed via _call_program to "git ls-files" + 2024-05-20 Mikael Magnusson <mikachu@gmail.com> * 52895: Completion/Unix/Type/_baudrates: Partial revert of diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 7370aaead..22b945e38 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -7531,7 +7531,7 @@ __git_files () { # First allow ls-files to pattern-match in case of remote repository. Use the # icase pathspec magic word to ensure that we support case-insensitive path # completion for users with the appropriate matcher configuration - files=(${(0)"$(_call_program files git ls-files -z --exclude-standard ${(q)opts} -- ${(q)${pref:+:\(icase\)$pref\*}:-.} 2>/dev/null)"}) + files=(${(0)"$(_call_program files git ls-files -z --exclude-standard ${(q)opts} -- ${(q)${pref:+:\(icase\)${(qq)pref}\*}:-.} 2>/dev/null)"}) __git_command_successful $pipestatus || return # If ls-files succeeded but returned nothing, try again with no pattern. Note |
