From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16299 invoked by alias); 24 Mar 2016 22:43:56 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21412 Received: (qmail 16361 invoked from network); 24 Mar 2016 22:43:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=jUrG06E16MsbHiAfbg2iDWUdmIT8UBTspdiI6Iey3KQ=; b=le6S+mUmUEM8QpABT+bEwjOaeKRpjAGdhEnvpRMWtbbLYSGLtcxNjOwlk6M1yx+ZzS lpD/KqQ0FyPUgHeonX2C5mXqkyONb5RuWbaS7Jal7A6z0IVq7Awen3dclyg/Qta17mDv TUhn/PlVuy4UK+cs6xbgGq0GSo0DvkhZx/Y7cerX4SwD5X9QR/LrPmvgnowJpg0fDDS0 ATz1BWnWnd4KkNoepMK1fLV1ZWn2var6w4jxBCkmd8hduZuczDDVIacHAZSowLuT9SWS VkbrDYfzhNNdK28X+Tfd3tIu7OAwTin9Kz300tY/haskhRgS4v92O3Nd9+L128LVNvyM 9xlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=jUrG06E16MsbHiAfbg2iDWUdmIT8UBTspdiI6Iey3KQ=; b=Q8/t/sFj9eL/iAdHHzeo9rHz9s6WE0qXcilCAjfag33XI/edC1Mq9zXneAtqNH67v8 3vHlK2hR2a35gEJfImzN1YNQZmTtSdHqEIZ5MigWdDHBDFAWgrhospI2+fW4t1Orm3rV O1A7OMxKJ4TrTFPCRfwCWpDLTGvYAsC6etkOJfYhEBxcckg55lsqhXbtkPVMgBi51bgH KH9CU7PbT5Y4ssk7rE9XNiyKN+/Tz10iTlfXfuzL2g+nJeXpQWLHCJDo8hiGjodAmNOh R/V08oFBxxxsqvaSzzNQcHVW1NgP8UTbBwY6lJOoH8DMr2yOW/HPXGz+Grp0uLf8YshG RtIQ== X-Gm-Message-State: AD7BkJKpy0e5m0xmzoKMieynbfkcGG3Ab/Gzs+LK6RW43uikld/bkIKxxY83A2YBIvCo+SaD4UWl9jGYJc81aw== MIME-Version: 1.0 X-Received: by 10.55.53.207 with SMTP id c198mr13676083qka.24.1458859430699; Thu, 24 Mar 2016 15:43:50 -0700 (PDT) In-Reply-To: References: <160323185356.ZM2458@torch.brasslantern.com> <20160324103837.678f2f36__45846.6877033517$1458816008$gmane$org@pwslap01u.europe.root.pri> <20160324182026.GA20669@chaz.gmail.com> Date: Thu, 24 Mar 2016 23:43:50 +0100 Message-ID: Subject: Re: End boldface also ends background color From: Mikael Magnusson To: Bart Schaefer Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Thu, Mar 24, 2016 at 10:34 PM, Bart Schaefer wrote: > On Thu, Mar 24, 2016 at 11:20 AM, Stephane Chazelas > 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