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

Prompts with emoji issues



I have the following theme:

# cat bsd-candy.zsh-theme
function toon {
  echo -n “👹"
}

PROMPT=$'%{$fg[magenta]%}$(toon)%{$reset_color%} %{$fg_bold[green]%}%n@%m %{$fg_bold[blue]%}%#%{$reset_color%} ‘
#

This works fine in nearly all cases, but often when editing long lines, the space after the # in the prompt gets eaten, and editing the line will have an offset of one character.

I think it only happens when the line length exceeds the terminal application’s width.

Am I doing something wrong here or is this an issue with my terminal emulator (Terminal.app in macOS in this case).

(I have a similar theme fo my Mac commanline that is nearly identical and has the same issues:

# cat apple-candy.zsh-theme
function toon {
  echo -n ""
}

PROMPT=$'%{$fg[magenta]%}$(toon)%{$reset_color%} %{$fg_bold[green]%}%n@%m %{$fg_bold[blue]%}%#%{$reset_color%} ‘
#

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





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