Re: [PATCH v2 09/12] pretty: add %C(auto) for auto-coloring on the next placeholder

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

 



Duy Nguyen <pclouds@xxxxxxxxx> writes:

> The above should have written "will turn on auto coloring on the
> following _textual_ placeholder". I didn't intend %C(auto) to be
> followed by %C(color) as it's already covered by %C(auto,red). But of
> course we could make it work too.

You are right that there is no need to say "%C(auto)%C(red)", it is
"%C(auto,red)", but that misses the point.

If %C(auto) applies to some %<placeholder> but not to some others,
the user needs to learn which %<placeholder> will eat the "auto" (so
it no longer applies to the next one) and which one will not even
look at "auto" (so the next %<placeholder> is affected by the auto,
i.e. making the effect of auto skip a %<placeholder>).  If the rule
were "%C(auto) applies to -next- placeholder", then the user does
not have to worry about which ones are what you call textual and
which ones are not (and there is no textual placeholder defined in
the glossary).

That would make it harder to learn. It would be much easier to
explain if you said "%C(auto) affects the next %-placeholder and
then resets".

I wonder if "Everything after %C(auto) will not be coloured if the
output is not going to the terminal.", i.e. not resetting once
colouring decision is made, makes more sense, though...




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]