From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18686 invoked by alias); 21 Feb 2010 09:34:23 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27730 Received: (qmail 22113 invoked from network); 21 Feb 2010 09:34:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Sun, 21 Feb 2010 04:24:44 -0500 (EST) From: "Benjamin R. Haskell" To: Zsh Workers Subject: [PATCH] Git completion without a config file Message-ID: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-1463810530-1201336720-1266744284=:31893" ---1463810530-1201336720-1266744284=:31893 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT 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 ---1463810530-1201336720-1266744284=:31893--