git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Robert Estelle via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Robert Estelle <robert.estelle@gmail.com>,
	Robert Estelle <robertestelle@gmail.com>
Subject: Re: [PATCH] color: allow colors to be prefixed with "reset"
Date: Tue, 26 Oct 2021 14:42:02 -0700	[thread overview]
Message-ID: <xmqqee87xy39.fsf@gitster.g> (raw)
In-Reply-To: <pull.1117.git.git.1635210227532.gitgitgadget@gmail.com> (Robert Estelle via GitGitGadget's message of "Tue, 26 Oct 2021 01:03:47 +0000")

"Robert Estelle via GitGitGadget" <gitgitgadget@gmail.com> writes:

> From: Robert Estelle <robertestelle@gmail.com>
>
> "reset" was previously treated as a standalone special color name
> representing `\e[m`. Now, it can apply to other color properties,
> allowing exact specifications without implicit attribute inheritance.
>
> For example, "reset green" now renders `\e[;32m`, which is interpreted
> as "reset everything; then set foreground to green". This means the
> background and other attributes are also reset to their defaults.
>
> Previously, this was impossible to represent in a single color:
> "reset" could be specified alone, or a color with attributes, but some
> thing like clearing a background color were impossible.
>
> There is a separate change that introduces the "default" color name to
> assist with that, but even then, the above could only to be represented
> by explicitly disabling each of the attributes:
>   green default no-bold no-dim no-italic no-ul no-blink no-reverse no-strike
>
> Signed-off-by: Robert Estelle <robertestelle@gmail.com>
> ---

Unlike the "default" patch, I quite do not see the point of the
example(s).  Instead of saying "reset green", can't we already say
"set bg to default, and set fg to green", thanks to the other one?
Or does "default" do too little to deserve a name that implies "go
back to default", e.g. by not defeating the 'blink' attribute that
was set earlier?

  reply	other threads:[~2021-10-26 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  1:03 [PATCH] color: allow colors to be prefixed with "reset" Robert Estelle via GitGitGadget
2021-10-26 21:42 ` Junio C Hamano [this message]
2021-10-27  4:28   ` Robert Estelle

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=xmqqee87xy39.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=robert.estelle@gmail.com \
    --cc=robertestelle@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;
as well as URLs for NNTP newsgroup(s).