mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
To: Josh Triplett <josh@joshtriplett.org>
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	valentinrothberg@gmail.com
Subject: Re: checkkconfigsymbols.py: add --no-color option
Date: Tue, 5 Jul 2016 17:22:05 +1000	[thread overview]
Message-ID: <8ab63bee-b025-427d-b4db-b71e729aa36d@au1.ibm.com> (raw)
In-Reply-To: <20160704122415.GA7267@x>

On 04/07/16 22:24, Josh Triplett wrote:
> Rather than requiring an explicit option, how about detecting
> whether stdout is a TTY and automatically suppressing color?
> You could check "os.isatty(1)" in main(), and set a global "color =
> False".  That would automatically handle the cases of redirecting to a
> file or piping to another script, without requiring the user to pass
> --no-color.

That's a good point - I'll submit a v2 with that.

-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited

  reply	other threads:[~2016-07-05  7:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04  8:39 [PATCH] " Andrew Donnellan
2016-07-04 10:44 ` Valentin Rothberg
2016-07-04 12:24 ` Josh Triplett
2016-07-05  7:22   ` Andrew Donnellan [this message]
2016-07-05  7:47 ` [PATCH v2] checkkconfigsymbols.py: add --no-color option, don't print color to non-TTY Andrew Donnellan
2016-07-05  8:45   ` Valentin Rothberg
2016-08-16  8:25   ` Valentin Rothberg
2016-08-16 10:49     ` Greg Kroah-Hartman

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=8ab63bee-b025-427d-b4db-b71e729aa36d@au1.ibm.com \
    --to=andrew.donnellan@au1.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=valentinrothberg@gmail.com \
    /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

all inboxes | Powered by JetHome®