Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Right-arrow character and autocomplete
- X-seq: zsh-workers 49469
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Cc: Darío Cuevas <superdarion@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Right-arrow character and autocomplete
- Date: Mon, 11 Oct 2021 09:40:49 -0700
- Archived-at: <https://zsh.org/workers/49469>
- In-reply-to: <CAN=4vMpmJGONGyibTdAJhU4+twx22b7Anrp26nZ4GTP8iSJgoQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAAA5jK0gikabxf7SxkMbnVvPJSfQv+x+XCbuBChmixSuzOh8iQ@mail.gmail.com> <CAN=4vMpmJGONGyibTdAJhU4+twx22b7Anrp26nZ4GTP8iSJgoQ@mail.gmail.com>
On Mon, Oct 11, 2021 at 5:15 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> On Mon, 11 Oct 2021 at 14:05, Darío Cuevas <superdarion@xxxxxxxxx> wrote:
>>
>> To reproduce, one
>> needs only do PROMPT="→" on .zshrc, open a terminal, start typing some
>> command (e.g. ls) and hit TAB: the command (ls) will be written twice.
>
> This usually happens when you put non-ascii characters in PROMPT (like that arrow) but your locale is not UTF-8. Run `locale` to confirm. To fix this, install and enable a UTF-8 locale.
Although that's the best solution, if for some reason that can't be
done you can try using the "glitch" prompt escape to tell zsh what the
actual character width is.
PROMPT="%1{→%}"
tells zsh that although there are 3 bytes in the %{...%} sequence, it
should be treated as occupying only one character position.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author