From: "Benjamin R. Haskell" <zsh@benizi.com>
To: Zsh Workers <zsh-workers@zsh.org>
Subject: [PATCH] Git completion without a config file
Date: Sun, 21 Feb 2010 04:24:44 -0500 (EST) [thread overview]
Message-ID: <alpine.LNX.2.01.1002210401020.31893@hp.internal> (raw)
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1093 bytes --]
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
reply other threads:[~2010-02-21 9:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=alpine.LNX.2.01.1002210401020.31893@hp.internal \
--to=zsh@benizi.com \
--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).