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

Re: Prompts with emoji issues



On 14 May 2020, at 12:18, Lewis Butler <lbutler@xxxxxxxxxx> wrote:
>  That works as expected, so the problem is a plugin or OMZ

Spoke to soon, while the prompt is working ok on my Mac, it is not working on the FreeBSD machine. I stripped out all the zsh and plugins from my .zshrc and have this:

# cat ~/.zshrc
export PATH=/usr/local/bin:$PATH
HYPHEN_INSENSITIVE="true"
ENABLE_CORRECTION="true"
COMPLETION_WAITING_DOTS="true"

# PROMPT

# Have tried %3G and %4G
function toon { echo -n "%{👹%2G%}" }

setopt PROMPT_SUBST
PROMPT='$(toon)%F{blue]%}%n@%m%f %F{green}%}#%f '
RPROMPT='%F{green}%}[%T] %f[%~] '

source ~/.zshaliases
source ~/.zshfunctions
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
fpath=(/usr/local/share/zsh-completions $fpath)
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

Which results in a prompt:

👹lbutlr@mail #_		[13:37] [~] 

Where _ is the cursor position.

So, once again the space after the # is being eaten.

If I remove the $(toon) from PROMPT, it works as expected.

I did find a very old note (Jan 2014) about a similar issue when using tmux (which I use) but the note said that calling tmux -u (which I do) avoids this issue.

<https://askubuntu.com/questions/410048/utf-8-character-not-showing-properly-in-tmux <https://askubuntu.com/questions/410048/utf-8-character-not-showing-properly-in-tmux>>

# grep sshf .zshaliases:
alias sshf='ssh <my server> -t tmux -u new-session -A -s mail'

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





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