zsh-users
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: zsh-users@zsh.org, Daniel Tameling <tamelingdaniel@gmail.com>
Subject: Re: xterm-direct and zsh
Date: Wed, 22 Jul 2020 21:46:04 -0700	[thread overview]
Message-ID: <CAHyO48ydEhGus7JA7JoS2mBkxyy5KJjoEMtW=6MXxZwy8xnm9Q@mail.gmail.com> (raw)
In-Reply-To: <1742-1595405609.146071@5EJy.NK4K.Onqo>

On Wed, Jul 22, 2020 at 1:13 AM Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
>
> "Aaron Jensen" wrote:
> > I'm trying to use TERM=xterm-direct with zsh and finding that zle doesn't attempt to render things in 256 color, instead falling back to 8 color.
>
> With TERM=xterm-direct, terminfo is reporting 16777216 (2^24) colours rather
> than 256. So what's to say that a palette of specifically size 256 is
> supported?

Fair enough, I just made the (incorrect) assumption that since 256 <
16M, it should be acceptable, but I can see why there's no guarantee
there. I'm sure in practice that terminal emulators that support
24-bit will also support 256 color and it's unfortunate that there's
not a way to specify both.

> Are you able to point to some documentation for xterm-direct and what it
> is supposed to achieve? It appears to exist to explicitly advertise
> support for 24-bit colour in the terminal. Many terminals have support
> but in the absence of a way to detect it, we've had to leave things up
> to the user.
>
> A side-effect of this is that it is no longer advertising support for a
> 256 color palette. It'd be good to know if that palette can be relied
> upon when 2^24 are reported. Even if it can, I'm not sure whether that
> is wise or is missing the point. In the past various smaller sizes were
> also common (rxvt-unicode is still often built with 88).

Right, I think in my instance since there are only a couple apps that
use 24 bit color that I care about, and there exist workarounds to
advertise to them that it is available, I will let zsh continue to
think that it's xterm-256color.

> > I found this patch, but it does not appear to be applied: https://inbox.vuxu.org/zsh-workers/20190207203257.7sfyvpooegdjgice@Daniels-MacBook-Air.local/
> >
> > Am I missing something or does zsh not properly support xterm-direct yet? I can't see where or why that patch never got merged.
>
> It's a patch that needs significant review time. There's a lack of
> documentation in ncurses so it would likely involve either guesswork
> or trying to make sense of discussion from ncurses development. Then
> understanding how things might react with other termcap/terminfo
> implementations and terminal definitions given that it is potentially
> adding assumptions to the code. The discussion with Sebastian somewhat
> buried the original point of the change. It does 4 separate things
> and change (b) is arguably pointless if the defacto standard works
> everywhere. I think at the time, I only had time to take a glance once
> that discussion was ended. I've added a note to my long TODO list and
> copied in the author of the patch.

Much appreciated, thank you for doing that.

> For the moment at least, I don't think any terminals are defaulting to
> xterm-direct and most systems I use have no terminal definition for it.
> So it requires people to be manually setting TERM to xterm-direct to
> trip over the issues.

Here I am, one who has tripped :) I was drawn in by the idea of
removing hacks, but I see that the world isn't quite ready for 24-bit
terminals without hacks.

Thanks,

Aaron

      parent reply	other threads:[~2020-07-23  4:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-21  4:22 Aaron Jensen
2020-07-22  8:13 ` Oliver Kiddle
2020-07-22 14:58   ` Ray Andrews
2020-07-22 15:19     ` Clinton Bunch
2020-07-22 18:48     ` Anssi Saari
2020-07-23  2:57       ` Ray Andrews
2020-07-23  4:46   ` Aaron Jensen [this message]

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='CAHyO48ydEhGus7JA7JoS2mBkxyy5KJjoEMtW=6MXxZwy8xnm9Q@mail.gmail.com' \
    --to=aaronjensen@gmail.com \
    --cc=okiddle@yahoo.co.uk \
    --cc=tamelingdaniel@gmail.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).