zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Git completion without a config file
@ 2010-02-21  9:24 Benjamin R. Haskell
  0 siblings, 0 replies; only message in thread
From: Benjamin R. Haskell @ 2010-02-21  9:24 UTC (permalink / raw)
  To: Zsh Workers

[-- 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-02-21  9:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-21  9:24 [PATCH] Git completion without a config file Benjamin R. Haskell

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).