Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 4/4] _git: Don't shadow global aliases
- X-seq: zsh-workers 46142
- From: Miroslav Koškár <mk@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 4/4] _git: Don't shadow global aliases
- Date: Sat, 27 Jun 2020 08:12:18 +0200
- Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=mkoskar.com; spf=pass smtp.mailfrom=mk@xxxxxxxxxxx; dmarc=pass header.from=<mk@xxxxxxxxxxx> header.from=<mk@xxxxxxxxxxx>
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1593238408; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=x5Qxi7HGyb/ygj/wrffKwlOhcfkWoTk3Pdv/qyi4nXM=; b=HTw9UsFpRzb7lz1cCsGoxQajm23bLRn1KxYrf/0d0yTCT3JGeZ20gPL+jhHOUCFzcCtG30lidh6ID+G4JBohwm/QWDyuBNr1Qn8ji5pKQVqRgy4D9Tjc1DcWCLpVPA2YxkcjqhmJF48rxiY+cvpzGkO6wpMjYOVzht2HVI/LYBw=
- Arc-seal: i=1; a=rsa-sha256; t=1593238408; cv=none; d=zohomail.com; s=zohoarc; b=jIPosA9CCQVpSyoDFN1OJRvFHfvBvWsHJb9V41peJqp/cmHeB5BI8IRKaGR6etajgy6ku+fAt2nh6relgXWWvoWP95Wgg4eFA4vtG+ETOTZ2Up4Dzwg5L4Gj8zJQPPlbOZYBk1/OVgxqI3QPqk6A7Hb0b3fC4+kNrf88GFYhZ8I=
- Cc: d.s@xxxxxxxxxxxxxxxxxx
- In-reply-to: <cover.1593236365.git.mk@mkoskar.com>
- 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
- References: <cover.1593236365.git.mk@mkoskar.com>
- Sender: zsh-workers@xxxxxxx
---
Completion/Unix/Command/_git | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e2d3d6e..6f7a462 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -8116,15 +8116,11 @@ _git() {
_git_commands && ret=0
;;
(option-or-argument)
- local -a aliases
local -A git_aliases
- local a k v
+ local a
local endopt='!(-)--end-of-options'
- aliases=(${(0)"$(_call_program aliases git config -z --get-regexp '\^alias\\.')"})
- for a in ${aliases}; do
- k="${${a/$'\n'*}/alias.}"
- v="${a#*$'\n'}"
- git_aliases[$k]="$v"
+ for a in ${(0)"$(_call_program aliases git config -z --get-regexp '\^alias\\.')"}; do
+ git_aliases[${${a/$'\n'*}/alias.}]=${a#*$'\n'}
done
local git_alias=git_aliases[\$words[1]]
if (( ${(P)+git_alias} && !$+commands[git-$words[1]] && !$+functions[_git-$words[1]] )); then
--
2.27.0
Messages sorted by:
Reverse Date,
Date,
Thread,
Author