help / color / mirror / code / Atom feed
* Escape sequences are not interpreted by "zle -M"
@ 2022-06-16 19:34 Fabian Lindner
  2022-06-19 22:13 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Lindner @ 2022-06-16 19:34 UTC (permalink / raw)
  To: zsh-workers

Hello everyone,

I noticed a bug (I believe), where escape sequences (for example color
codes) do not work as intended when beeing displayed with "zle -M".
A minimal working example (with "zsh -f") that showcases what I mean:

$ echo $TERM
$ zle-line-init () { zle -M "^[[38;5;1mred" }
$ zle -N zle-line-init

After that, the string displayed below the prompt is the literal string
"\033[38;5;1mred" (without any colors applied). I inserted the escape
character via Ctrl+V. I also tested with \033 instead of the escape
character, but I get the same result.
$ echo "^[[38;5;1mred"
works as intended and displays the string "red" in the correct color.

I am using zsh version 5.9 (x86_64-pc-linux-gnu) on ArchLinux and my
terminal is st, but I also tested on gnome-terminal and allacrity with
the same result.

If someone knows how to fix this, or if this is fixed at any point,
please let me know! (Btw. I'm not subscribed to the mailing list, so I
would appreciate it, if I could get a direct answer.)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-19 22:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-16 19:34 Escape sequences are not interpreted by "zle -M" Fabian Lindner
2022-06-19 22:13 ` Bart Schaefer

Code repositories for project(s) associated with this inbox:


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).