git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Pierre Habouzit <madcoder@debian.org>
Cc: "Shawn O. Pearce" <spearce@spearce.org>, git@vger.kernel.org
Subject: Re: [PATCH] Add some fancy colors in the test library when terminal supports it.
Date: Mon, 22 Oct 2007 14:18:22 +0200	[thread overview]
Message-ID: <471C950E.40702@viscovery.net> (raw)
In-Reply-To: <20071022121106.GA7151@artemis.corp>

Pierre Habouzit schrieb:
> On Mon, Oct 22, 2007 at 11:35:30AM +0000, Johannes Sixt wrote:
>> Pierre Habouzit schrieb:
>>> On Mon, Oct 22, 2007 at 08:53:36AM +0000, Johannes Sixt wrote:
>>>> Pierre Habouzit schrieb:
>>>>> +say_color () {
>>>>> +	[ "$nocolor" = 0 ] &&  [ "$1" != '-1' ] && tput setaf "$1"
>>>>> +	shift
>>>>> +	echo "* $*"
>>>>> +	tput op
        ^^^^^^^^
I am talking about this line.

>>>>> +}
>> I wanted to point out that if tput is not 
>> available, the second invocation will leave "tput: command not found" 
>> behind on stderr. Therefore, I proposed to make the definition of 
>> say_color() different depending on whether $color is set or not. Then you 
>> don't need to test for $color twice inside the function.
> 
>   Right we can do that. I'll try to rework the patch. and no it
> shouldn't leave tput: command not found as I 2>/dev/null and I think the
> shell doesn't print that in that case. At least my zsh doesn't.

There is no 2>/dev/null. Am I missing something?

-- Hannes

  reply	other threads:[~2007-10-22 12:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22  8:13 [PATCH] Add some fancy colors in the test library when terminal supports it Pierre Habouzit
2007-10-22  8:53 ` Johannes Sixt
2007-10-22 11:24   ` Pierre Habouzit
2007-10-22 11:35     ` Johannes Sixt
2007-10-22 12:11       ` Pierre Habouzit
2007-10-22 12:18         ` Johannes Sixt [this message]
2007-10-22 13:45           ` Pierre Habouzit
2007-10-23  4:08 ` Christian Couder
2007-10-23  6:37   ` Johannes Sixt
2007-10-23  8:13   ` Pierre Habouzit
  -- strict thread matches above, loose matches on Subject: below --
2007-10-24 20:03 Small enhancements of the test-lib.sh Pierre Habouzit
     [not found] ` <1193256219-24222-2-git-send-email-madcoder@debian.org>
2007-10-24 20:28   ` [PATCH] Add some fancy colors in the test library when terminal supports it Pierre Habouzit

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=471C950E.40702@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=madcoder@debian.org \
    --cc=spearce@spearce.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.
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).