Re: [PATCH] color: allow colors to be prefixed with "reset"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Robert Estelle via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> From: Robert Estelle <robertestelle@xxxxxxxxx>
>
> "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@xxxxxxxxx>
> ---

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?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux