Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 1/1] fix file completion for git
- X-seq: zsh-workers 42333
- From: Christian Hesse <list@xxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 1/1] fix file completion for git
- Date: Wed, 31 Jan 2018 08:53:22 +0100
- Cc: Christian Hesse <mail@xxxxxxxx>
- Dkim-filter: OpenDKIM Filter v2.10.3 mx.mylinuxtime.de 1ABB0264D3
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eworm.de; s=mail; t=1517385216; bh=A1ETZ6nFf50NXA8UNeFLzhtiARtHjiXtNayRGXecTj4=; h=From:To:Cc:Subject:Date; b=bUXQhi3dcgfRLo/JJXCxk2Aa2svBKLGbfq4ujg59nbmmP00A+ZBw0gK5JE7+koIxI z4unfTeF8S3gv8wb2ECenriWI+TS+tk9EnT9pAdtfJQUItEkmg1ZnhlrHhAf+9+rcS yVG6WIdQgJ8Ol3PrcFJ86+LbwCeP/gsZDrwrnH5Y=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
From: Christian Hesse <mail@xxxxxxxx>
Starting with version 2.16.0 git does no longer accept empty string as a
pathspec element. Thus we have to replace empty strings with a dot.
Thanks to 'okdana' for help on irc.
https://github.com/git/git/commit/9e4e8a64c2b9043b7ae2b6476efd9214c6738505
Signed-off-by: Christian Hesse <mail@xxxxxxxx>
---
Completion/Unix/Command/_git | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 80504c003..002709a5f 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6759,7 +6759,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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author