Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: xterm-direct and zsh
On Wed, Jul 22, 2020 at 1:13 AM Oliver Kiddle <okiddle@xxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author