From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh-workers@zsh.org
Subject: [PATCH] _git: Handle zero defined aliases better
Date: Fri, 5 Apr 2013 19:54:03 +0200 [thread overview]
Message-ID: <1365184443-8781-1-git-send-email-ft@bewatermyfriend.org> (raw)
In-Reply-To: <877gkgc2j1.fsf@ft.bewatermyfriend.org>
---
Come to think of it, I don't remember writing this. But I think this
will fix the issue.
Completion/Unix/Command/_git | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 2b6a369..32d139a 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4757,7 +4757,13 @@ __git_aliases () {
(( $+functions[__git_extract_aliases] )) ||
__git_extract_aliases () {
- aliases=(${^${${(0)"$(_call_program aliases "git config -z --get-regexp '^alias.'")"}#alias.}/$'\n'/:alias for \'}\')
+ local -a tmp
+ tmp=(${${(0)"$(_call_program aliases "git config -z --get-regexp '^alias.'")"}#alias.})
+ if (( ${#tmp} > 0 )); then
+ aliases=(${^tmp/$'\n'/:alias for \'}\')
+ else
+ aliases=()
+ fi
}
(( $+functions[__git_date_formats] )) ||
--
1.8.2.rc1
next prev parent reply other threads:[~2013-04-05 18:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-04 17:44 Curious result from "git" completion Bart Schaefer
2013-04-04 19:33 ` Nikolai Weibull
2013-04-05 15:19 ` Bart Schaefer
2013-04-05 17:26 ` Frank Terbeck
2013-04-05 17:54 ` Frank Terbeck [this message]
2013-04-05 20:06 ` [PATCH] _git: Handle zero defined aliases better Nikolai Weibull
2013-04-05 20:15 ` Frank Terbeck
2013-04-04 19:57 ` Curious result from "git" completion Frank Terbeck
2013-04-07 18:33 ` Bart Schaefer
2013-04-07 22:41 ` Aaron Schrab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1365184443-8781-1-git-send-email-ft@bewatermyfriend.org \
--to=ft@bewatermyfriend.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).