zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@zsh.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh workers <zsh-workers@zsh.org>
Subject: Re: Turning display attributes on / off in prompt strings
Date: Wed, 21 Dec 2022 18:12:38 +0100	[thread overview]
Message-ID: <35039-1671642758.687922@w9LM._aQT.AVUt> (raw)
In-Reply-To: <CAH+w=7Yt757b8erwTo5Y1+1fBSQbShV6XCaM8q6wnkGZHmQqeA@mail.gmail.com>

On 16 Dec, you wrote:
> So ... I've been playing with this, and on my "xterm-color" terminal
> se and ue are both $'\e[m' -- and yet "print -P" and ${(%)...} and so
> on do "the right thing" and output extra control sequences depending
> on what other attributes are active.  For example

Just noticing these details again, it would seem that zle is currently
broken for your case:

% TERM=xterm-color zsh -df
% zle-line-init() {
region_highlight=( 'P 1 2 underline' 'P 1 4 standout' )
LBUFFER=1234567890
}
% zle -N zle-line-init

Only the 2 is in standout.

Are you sure xterm-color is the right $TERM value to use? Are you
getting that by default or have you set it? Just running xterm gives me
a TERM value of xterm. Setting it to xterm-256color would also work. I
use rxvt-unicode which has display glitches in compinit menus that I
think are zsh issues.

So perhaps we do need to invalidate attributes after turning off
standout and underline if we stick to termcap. I'm still sceptical about
our prompt code doing it for turning bold on.

Oliver


  parent reply	other threads:[~2022-12-21 17:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16 19:45 Bart Schaefer
2022-12-17  0:43 ` Oliver Kiddle
2022-12-17  7:50   ` Bart Schaefer
2022-12-17  9:47     ` Oliver Kiddle
2022-12-17 19:45       ` Bart Schaefer
2022-12-21 16:46         ` Oliver Kiddle
2022-12-21 21:28           ` Bart Schaefer
2022-12-21 17:12 ` Oliver Kiddle [this message]
2022-12-21 21:03   ` 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=35039-1671642758.687922@w9LM._aQT.AVUt \
    --to=opk@zsh.org \
    --cc=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).