Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: End boldface also ends background color



On Thu, Mar 24, 2016 at 10:34 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Thu, Mar 24, 2016 at 11:20 AM, Stephane Chazelas
> <stephane.chazelas@xxxxxxxxx> wrote:
>>
>> In short there's no guarantee that resetting one attribute will
>> not reset others.
>
> Perhaps what we should do is simply document that %B %U %S %F{} are
> not guaranteed to nest.  For example:
>
> print -P '%F{red} red %F{blue} blue %f oops, not red %f'
>
> Then people know that they might need to write
> %U%Bbold-underline%b%Uunderline%u if that's what they mean (but they
> might not get the underline in bold-underline because %B might reset
> it).
>
> Or just use $fg et al. from colors; so what if it's a bit verbose?
> How often are you re-typing it?

Using $fg from colors doesn't buy you anything over using the builtin
prompt sequences though. They also do not have an un-bold sequence.

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author