From: John Brooks <john@fastquake.com>
To: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: Change format of --color argument to --color[=WHEN]
Date: Mon, 5 Jun 2017 23:28:19 +0000 [thread overview]
Message-ID: <20170605232819.GA1775@kitsune.fastquake.com> (raw)
In-Reply-To: <1496704230.1968.5.camel@perches.com>
On Mon, Jun 05, 2017 at 04:10:30PM -0700, Joe Perches wrote:
> On Mon, 2017-06-05 at 18:27 -0400, John Brooks wrote:
> > The boolean --color argument did not offer the ability to force colourized
> > output even if stdout is not a terminal.
>
> OK, but why is colorizing output not to terminals desired?
For example, to retain coloured output when using a pager (such as less -R).
Which is convenient for viewing/searching lengthy output from larger patch
sets, or when one is using something that interferes with the ability to scroll
such as screen, tmux, or mosh.
>
> > Change the format of the argument
> > to the familiar --color[=WHEN] construct as seen in common Linux utilities
> > such as ls and dmesg, which allows the user to specify whether to colourize
> > output always, never, or only when the output is a terminal ("auto").
> >
> > Because the option is no longer boolean, --nocolor (or --no-color) is no
> > longer available. Users of the old negative option should use --color=never
> > instead.
>
> In general, I don't mind, but perhaps this option name
> could/should change.
>
> As is, this also causes a previous command line that worked
> with --color to fail
>
> $ ./scripts/checkpatch.pl --color foo.patch
> Invalid color mode: foo.patch
>
Oh, that's pretty bad. I should have thought of that, sorry. I'll see what I
can do to stop it from eating other arguments.
--
John Brooks
next prev parent reply other threads:[~2017-06-05 23:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-05 22:27 [PATCH] checkpatch: Change format of --color argument to --color[=WHEN] John Brooks
2017-06-05 23:10 ` Joe Perches
2017-06-05 23:28 ` John Brooks [this message]
2017-06-06 5:48 ` Adam Borowski
2017-06-06 17:07 ` [PATCH v2] " John Brooks
2017-06-06 19:21 ` Joe Perches
2017-06-06 19:56 ` John Brooks
2017-06-06 20:03 ` Joe Perches
2017-06-07 1:50 ` [PATCH V3] " Joe Perches
2017-06-07 13:41 ` John Brooks
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=20170605232819.GA1775@kitsune.fastquake.com \
--to=john@fastquake.com \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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