zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Hackers List <zsh-workers@zsh.org>
Subject: Termcap and boldface (was sticky-note)
Date: Fri, 14 May 2021 16:40:09 -0700	[thread overview]
Message-ID: <CAH+w=7a0OgvA+-RZup9mbBQxC9-4yTX6Q3mmZAXcD9iRtxDVfg@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3TJK7xZNx1nKE2A4xTvLy+oXjVFniVtWW_UtkN-UMAyuA@mail.gmail.com>

On Tue, May 11, 2021 at 3:18 AM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> On 5/9/21, Bart Schaefer <schaefer@brasslantern.com> wrote:
> > That is, why TCALLATTRSOFF ?  That isn't done for %s or %u ... why is
> > there no TCBOLDFACEEND defined?
>
> I think that's a shortcoming in termcap and/or terminfo. In termcap
> there is md (1m) and me (0m) that should correspond to bold, but 0m
> turns off all attributes. Compare with us (4m) and ue (24m).

A couple of interesting things.

ANSI clumps together bold/faint/normal as 01/02/22 and
blink/fast-blink/steady as 05/06/25.  21 and 26 are for unrelated
features (double-underline and proportional).  This breaks the pattern
of all the other on/off pairs that are always 0x/2x.

Terminfo man page claims that standout is supposed to be reverse bold,
but zsh's use of termcap in prompts renders %S as reverse only.

> html_chapter/termcap_4.html
> also implies that there is no specific termcap sequence to only turn
> off specific appearance modes.

Terminfo manual says about the vt220 example, "We begin each escape
sequence by turning off any existing modes, since  there is no quick
way to determine whether they are active."  That also doesn't match
what appears to happen in prompts with combinations of %S%B etc.

> Since we already assume ANSI for things like colors, I don't think we
> would lose a lot of compatibility in practice if we just use 22
> instead of 0 for %b

That would mean special-casing whether we use symbolic termcap names,
so it's less straightforward that might be expected.


  reply	other threads:[~2021-05-14 23:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1185563186.165566.1619896723304.ref@mail.yahoo.com>
2021-05-01 19:18 ` Suggested improvement for sticky-note vapnik spaknik
2021-05-02 23:57   ` Bart Schaefer
2021-05-04  2:06     ` vapnik spaknik
2021-05-09 20:50       ` Bart Schaefer
2021-05-11 10:18         ` Mikael Magnusson
2021-05-14 23:40           ` Bart Schaefer [this message]
2021-05-11 12:37         ` vapnik spaknik
2023-11-12 21:10         ` Bart Schaefer
2023-11-19  5:25           ` 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='CAH+w=7a0OgvA+-RZup9mbBQxC9-4yTX6Q3mmZAXcD9iRtxDVfg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).