zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: "Darío Cuevas" <superdarion@gmail.com>,
	"Zsh hackers list" <zsh-workers@zsh.org>
Subject: Re: Right-arrow character and autocomplete
Date: Mon, 11 Oct 2021 09:40:49 -0700	[thread overview]
Message-ID: <CAH+w=7YM5uLPy6MirkrQ-psu_JHBJZ2Y+Ddb7wF_ZKqJhZKd=g@mail.gmail.com> (raw)
In-Reply-To: <CAN=4vMpmJGONGyibTdAJhU4+twx22b7Anrp26nZ4GTP8iSJgoQ@mail.gmail.com>

On Mon, Oct 11, 2021 at 5:15 AM Roman Perepelitsa
<roman.perepelitsa@gmail.com> wrote:
>
> On Mon, 11 Oct 2021 at 14:05, Darío Cuevas <superdarion@gmail.com> 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.


  reply	other threads:[~2021-10-11 16:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-11 12:04 Darío Cuevas
2021-10-11 12:14 ` Roman Perepelitsa
2021-10-11 16:40   ` Bart Schaefer [this message]
     [not found]   ` <CAAA5jK29fniAzbjoJMwX2ikG9ugwbt9p50B4eQKG3oXWKdAd+w@mail.gmail.com>
2021-10-11 17:01     ` Darío Cuevas

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='CAH+w=7YM5uLPy6MirkrQ-psu_JHBJZ2Y+Ddb7wF_ZKqJhZKd=g@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=roman.perepelitsa@gmail.com \
    --cc=superdarion@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).