From: Stephane Chazelas <stephane@chazelas.org>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Daniel Shahaf <d.s@daniel.shahaf.name>,
Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [regression] %2K prompt expansion no longer works
Date: Mon, 26 Oct 2020 07:29:34 +0000 [thread overview]
Message-ID: <20201026072934.lwamqkoepmubftg3@chazelas.org> (raw)
In-Reply-To: <CAHYJk3QedKBSPo=pP+t0Lv4g=SUYKQvEqqdb8pg732n9xYbLeg@mail.gmail.com>
2020-10-25 22:29:44 +0100, Mikael Magnusson:
[...]
> >> Just noticed that these [unposted] testcases don't pass. Added some
> >> debugging prints and it turns out that %F{green} uses a different code
> >> than specifying the number. Eg,
> >>
> >> echo $F1 $F2 $F3 $F4 | cat -v
> >>
> >> results in
> >>
> >> ^[[38;5;2m ^[[38;5;2m ^[[38;5;2m ^[[32m
[...]
I can reproduce with:
$ TERM=rxvt-unicode-256color zsh -c 'print -P %F{green}' | hd
00000000 1b 5b 33 32 6d 0a |.[32m.|
00000006
$ TERM=rxvt-unicode-256color zsh -c 'print -P %F{1}' | hd
00000000 1b 5b 33 38 3b 35 3b 31 6d 0a |.[38;5;1m.|
0000000a
Shouldn't %F{green} give the same as %F{2} (echoti setaf 2) instead of
hardcoding the escape sequence?
--
Stephane
next prev parent reply other threads:[~2020-10-26 7:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-30 11:13 Stephane Chazelas
2020-08-30 13:17 ` Mikael Magnusson
2020-10-24 14:21 ` Mikael Magnusson
2020-10-25 20:12 ` Daniel Shahaf
2020-10-25 21:29 ` Mikael Magnusson
2020-10-26 7:29 ` Stephane Chazelas [this message]
2020-10-29 23:09 ` Oliver Kiddle
2020-10-30 0:42 ` Bart Schaefer
2020-10-30 9:11 ` Peter Stephenson
2021-03-30 20:03 ` Oliver Kiddle
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=20201026072934.lwamqkoepmubftg3@chazelas.org \
--to=stephane@chazelas.org \
--cc=d.s@daniel.shahaf.name \
--cc=mikachu@gmail.com \
--cc=zsh-workers@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).