* xterm-direct and zsh @ 2020-07-21 4:22 Aaron Jensen 2020-07-22 8:13 ` Oliver Kiddle 0 siblings, 1 reply; 7+ messages in thread From: Aaron Jensen @ 2020-07-21 4:22 UTC (permalink / raw) To: zsh-users [-- Attachment #1: Type: text/plain, Size: 464 bytes --] Hi there, 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. 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. Thanks, Aaron ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: xterm-direct and zsh 2020-07-21 4:22 xterm-direct and zsh Aaron Jensen @ 2020-07-22 8:13 ` Oliver Kiddle 2020-07-22 14:58 ` Ray Andrews 2020-07-23 4:46 ` Aaron Jensen 0 siblings, 2 replies; 7+ messages in thread From: Oliver Kiddle @ 2020-07-22 8:13 UTC (permalink / raw) To: Aaron Jensen; +Cc: zsh-users, Daniel Tameling "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? 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). > 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. 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. Oliver ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: xterm-direct and zsh 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 4:46 ` Aaron Jensen 1 sibling, 2 replies; 7+ messages in thread From: Ray Andrews @ 2020-07-22 14:58 UTC (permalink / raw) To: zsh-users On 2020-07-22 1:13 a.m., Oliver Kiddle 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. > Pardon a dumb question, but what use does a terminal have for a huge number of colors? I colorize my prompt but even 8 colors is more than enough. There must be some functionality that I'm completely unaware of. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: xterm-direct and zsh 2020-07-22 14:58 ` Ray Andrews @ 2020-07-22 15:19 ` Clinton Bunch 2020-07-22 18:48 ` Anssi Saari 1 sibling, 0 replies; 7+ messages in thread From: Clinton Bunch @ 2020-07-22 15:19 UTC (permalink / raw) To: zsh-users You need orange for your color scheme. On 7/22/2020 9:58 AM, Ray Andrews wrote: > On 2020-07-22 1:13 a.m., Oliver Kiddle 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. >> > Pardon a dumb question, but what use does a terminal have for a huge > number of colors? I colorize my prompt but even 8 colors is more than > enough. There must be some functionality that I'm completely unaware of. > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: xterm-direct and zsh 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 1 sibling, 1 reply; 7+ messages in thread From: Anssi Saari @ 2020-07-22 18:48 UTC (permalink / raw) To: zsh-users Ray Andrews <rayandrews@eastlink.ca> writes: > Pardon a dumb question, but what use does a terminal have for a huge > number of colors? I colorize my prompt but even 8 colors is more than > enough. There must be some functionality that I'm completely unaware > of. I guess it's having the color you want. Personally I like to utilize other people's work so I download color schemes for various terminal programs and they usually assume a 256 color terminal. In the end it's about freedom of choice. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: xterm-direct and zsh 2020-07-22 18:48 ` Anssi Saari @ 2020-07-23 2:57 ` Ray Andrews 0 siblings, 0 replies; 7+ messages in thread From: Ray Andrews @ 2020-07-23 2:57 UTC (permalink / raw) To: zsh-users On 2020-07-22 11:48 a.m., Anssi Saari wrote: > ... and they usually assume a 256 color terminal. In the end it's > about freedom of choice. > If I hear nothing more then that'll do for an answer, still if 2^24 colors are desired that seems to indicate a need for true color rendition and that's not something one might think of as of much use in a shell. Not that it would ever do any harm either. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: xterm-direct and zsh 2020-07-22 8:13 ` Oliver Kiddle 2020-07-22 14:58 ` Ray Andrews @ 2020-07-23 4:46 ` Aaron Jensen 1 sibling, 0 replies; 7+ messages in thread From: Aaron Jensen @ 2020-07-23 4:46 UTC (permalink / raw) To: Oliver Kiddle; +Cc: zsh-users, Daniel Tameling 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 ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-07-23 4:46 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-07-21 4:22 xterm-direct and zsh 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
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).