Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
unicode in prompt breaks command search
- X-seq: zsh-workers 45314
- From: Nathan Sidwell <nathan@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: unicode in prompt breaks command search
- Date: Thu, 16 Jan 2020 16:43:37 -0500
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Sender: Nathan Sidwell <nathanmsidwell@xxxxxxxxx>
For reasons, I put a multibyte unicode char in $PROMPT, this ends up
messing with zsh's idea of the current column, as it doesn't understand
the display width of $PROMPT.
For example reverse search, here's an example using <f0><9f><a1><85>
set PROMPT="🡅"
press C-r, see cursor gets indented another 3 spaces -- we're now at
column 5, which would be correct if each byte of $PROMPT was a separate
display char.
A slightly modified example is to enter some text before pressing C-r,
then the first 3 chars get retained on the display (but not the input
buffer at least).
Is this supposed to work?
This is ZSH 5.2 on a fedora 30 system, and an XFCE terminal. Let me
know if you need more info (I'm not on the list).
nathan
--
Nathan Sidwell
Messages sorted by:
Reverse Date,
Date,
Thread,
Author