Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've tried using:

Though the output from git push on error is all white. Everything in my ZSH is colored and this looks ugly & becomes harder to parse as everything else has color.

share|improve this question
add comment

1 Answer 1

Sorry to say, but it looks like support for this just isn't built in to git at the moment... Comparing this:

https://github.com/git/git/blob/master/builtin/push.c

with this:

https://github.com/git/git/blob/master/builtin/log.c

You'll see that the latter has various references to color (starting with including color.h), and the former does not. That could be a starting point for you or someone to modify the git source (and submit a pull request or similar) to have this functionality.

I'm not sure why you're not having success with stderred, though; git push does, I've just confirmed, send its output to stream 2 (stderr), so it seems like it ought to work, provided that it's working for other utilities.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.