Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Prompts with emoji issues

On Wed, May 13, 2020 at 2:26 PM Lewis Butler <lbutler@xxxxxxxxxx> wrote:

> Found what I had done, which still had occasional issues with eating the
> space (or less often, adding characters to the start of the line)
> function toon {
>   echo -n “%(👹%2G%}”
> }
> It’s not all the time and it is an annoyance rather than a showstopper.

Firstly, if that's a literal copy-and-paste, you've written percent
open-paren rather than percent open-brace.

Assuming that's not the problem ...  You mentioned having a similar
occurrence but with a different emoji on your Mac.  Different emoji
characters might need different numbers of "glitch", e.g., on the Mac the
emoji might occupy only one position, so you need only %1G (or just %G).
Also on different terminals the same emoji might occupy different numbers
of positions, though that's less likely.

There's also the possibility of interference by something you haven't
mentioned, such as an RPROMPT setting.  You haven't told us the version(s)
of zsh under which you encountered this -- it's possible there was
something related that has since been fixed.

In any case I can't reproduce a problem with only the PROMPT from your
first message.

Messages sorted by: Reverse Date, Date, Thread, Author