zsh-users
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: End boldface also ends background color
Date: Thu, 24 Mar 2016 23:43:50 +0100	[thread overview]
Message-ID: <CAHYJk3T9gGLaDrOqSzC7_71bO090=guTCoYAxW76=CKZo9-Rng@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7aEitgjr4+eoSwkezEKhexbsthPGBqsj=mm7JkYz3X53w@mail.gmail.com>

On Thu, Mar 24, 2016 at 10:34 PM, Bart Schaefer
<schaefer@brasslantern.com> wrote:
> On Thu, Mar 24, 2016 at 11:20 AM, Stephane Chazelas
> <stephane.chazelas@gmail.com> 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


  reply	other threads:[~2016-03-24 22:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 19:44 Dominik Ritter
2016-03-22 21:00 ` Mikael Magnusson
2016-03-24  1:53   ` Bart Schaefer
2016-03-24 10:38     ` Peter Stephenson
2016-03-24 14:53       ` Danek Duvall
2016-03-24 17:26         ` Bart Schaefer
2016-03-24 18:08           ` Danek Duvall
2016-03-24 17:21       ` Mikael Magnusson
2016-03-24 17:33       ` Bart Schaefer
2016-03-24 17:39         ` Peter Stephenson
2016-03-24 18:00           ` Bart Schaefer
     [not found]     ` <20160324103837.678f2f36__45846.6877033517$1458816008$gmane$org@pwslap01u.europe.root.pri>
2016-03-24 18:20       ` Stephane Chazelas
2016-03-24 21:34         ` Bart Schaefer
2016-03-24 22:43           ` Mikael Magnusson [this message]
2016-03-25  0:23             ` Bart Schaefer

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='CAHYJk3T9gGLaDrOqSzC7_71bO090=guTCoYAxW76=CKZo9-Rng@mail.gmail.com' \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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).