Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: git completion - pass on --git-dir option
- X-seq: zsh-workers 39514
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: git completion - pass on --git-dir option
- Date: Fri, 30 Sep 2016 09:12:55 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1475219576; bh=fDSOfWAhTUqVSDWEe7cgjSqRdcxGs003jvbZAewX7UM=; h=From:To:Subject:Date:From:Subject; b=liW8XO+YyIZRKiN4oJip6KowU9yrUAkRljPci0dgiZza2xZ0AbyuhNAqRy2pfDzFGsB4zxp4ZB6bK+rlY2VGUSfRR11bF531ir3ZZxXRZMBDhrBOT4Zlh2UGx8G2J2sEDb9h9vk+tWmAWC15rl2Gw9Tad03xuMT4a+77oaECL7Txjb6iaROrqSVQCWj1Rn46S3NaupKEmSWY6VknDcwzTsszx2ZpzvK2F/1+UndMJrk104JLfAkWtkPafu4fGukmqsG8YagnNfwGpEL66BpsgMYGOQmw8lCNVEI3MDPn2s+X4iN2Q/QtXPxwZXqShX/Llhh8FTDhqsIV6gt+s4mVLA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Various aspects of git completion don't work if the option --git-dir is
used. This solves that by putting the value in $GIT_DIR.
Oliver
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 2178b82..c89ab56 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -7484,7 +7484,7 @@ _git() {
;;
(option-or-argument)
curcontext=${curcontext%:*:*}:git-$words[1]:
-
+ (( $+opt_args[--git-dir] )) && local -x GIT_DIR=$opt_args[--git-dir]
if ! _call_function ret _git-$words[1]; then
if zstyle -T :completion:$curcontext: use-fallback; then
_default && ret=0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author