Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Git completion without a config file
- X-seq: zsh-workers 27730
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxx>
- Subject: [PATCH] Git completion without a config file
- Date: Sun, 21 Feb 2010 04:24:44 -0500 (EST)
- 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
Using git completion under a user account I don't normally use, it
seemed to work fine, except I got a warning message:
fatal: error processing config file(s)
Apparently, that message is printed when running 'git config' without a
user or system config. The following patch silences it.
--
Best,
Ben
---
Completion/Unix/Command/_git | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index c87593e..801dc9c 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -351,7 +351,7 @@ __git_aliases () {
# out the names, skipping the values.
# TODO: Should check if the terminal is unicode capable. If so, use â and â
# instead of '.
- aliases=(${^${${(M)${(f)"$(_call_program aliases git config --list)"}:#alias.*}#alias.}/(#b)=(*)/:alias for \'$match[1]}\')
+ aliases=(${^${${(M)${(f)"$(_call_program aliases git config --list 2> /dev/null)"}:#alias.*}#alias.}/(#b)=(*)/:alias for \'$match[1]}\')
__git_command_successful || return 0
local expl
--
1.6.6
Messages sorted by:
Reverse Date,
Date,
Thread,
Author