Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Terminal query artifacts and backward compatibility issue in zsh-dev version



Sorry for replying to an old post:

> 2025/12/10 8:00, Oliver Kiddle <opk@xxxxxxx> wrote:
> 
> If a terminal fails to consume an escape sequence printable parts of the
> sequence are printed. Normally, the prompt should wipe it faster than
> you can observe it

At least on my Macs I can easily observe it. I don't care it because
I know it's harmless, but some users would be worried by it.

But the latest Terminal.app (macOS Tahoe, TERM_PROGRAM_VERSION=470)
already supports truecolor and recognizes the TQ_RGB, so +q524742 is
not printed. There should be no problem when Apple includes the next
release version of zsh (with termquery) as /bin/zsh in the next
(or later) version of macOS.

Users who install dev-versions of zsh by themself are not
'ordinary users', I think, and hopefully they will mange to find
it harmless, or set .term.extensions in a start up file.

> I also wouldn't put this in .zshenv. zle is normally only loaded for
> interactive shells so .zshrc is more applicable.

On macOS, Apple's /etc/zshrc uses 'bindky' that requires Zle. So we
need to use ~/.zshenv, maybe in a block 'if [[ -o i ]] ...'.

Another problem is 'is-at-least 5.9.0.3  5.9' returns true
(workers/54336, or workers/47314 by Daniel).
This can be overcome only by installing a fixed version of
is-at-least (for example in /usr/local/share/zsh/site-functions),
or resorting to a hack like this:

> 2025/12/07 20:16、Langbart <Langbart@xxxxxxxxxxxxxx> wrote:
> 
> autoload -Uz is-at-least
> if [[ $ZSH_VERSION != 5.9 ]] && is-at-least 5.9; then
>  .term.extensions=( -query )
> fi




Messages sorted by: Reverse Date, Date, Thread, Author