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

Re: Prompts with emoji issues



On 13 May 2020, at 21:54, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Wed, May 13, 2020 at 2:26 PM Lewis Butler <lbutler@xxxxxxxxxx> wrote:
>   echo -n “%(👹%2G%}”


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

Typo.

> 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.

Same terminal emulator, same behavior, different emojis. I have setups for 👹, , and 🥧 (though I use the pi so rarely I am not sure it has the same problem. Currently, I always lose the space after the #

Whit this
#v+
function toon {
  echo -n “%(👹%2G%}”
}

PROMPT=$'$(toon) %{$fg_bold[red]%}%n@%m %{$fg_bold[green]%}# '

👹 root@mail #cd /var/log
👹 root@mail #pwd
/var/log
#v-

If I remove the space after the $(toon) in PROMPT I get

👹root@mail #pwd

Still no final space.

> There's also the possibility of interference by something you haven't mentioned, such as an RPROMPT setting.

That is the entirety of the file, barring comments.

>  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.

oh-my-Zsh updates frequently so if I do not currently have the latest version I am no more than a day or two out of date. Zsh versions are "5.7.1 (x86_64-apple-darwin19.0)" and "zsh 5.8 (i386-portbld-freebsd12.1)", but this problem has been consistently inconsistent since last fall.

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

That’s what I was afraid of. I’ll try playing around with a new user account on the off chance there is some odd setting in my Terminal.app preferences.

-- 
ɹןʇnqן
<mailto:lbutler@xxxxxxxxxx>
tel:+1.303.219.0564





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