Search code examples
emacszsh

random numbers in start of multi-term prompt when using zsh


Below is the prompt that I see when I use zsh with the multi-term in emacs. What are the numbers that I see before the dir and how do I get rid of them ?

\342\236\234 ~/


Solution

  • This is the UTF-8 encoding of the U+279C HEAVY ROUND-TIPPED RIGHTWARDS ARROW Unicode character (➜), whose bytes are output in octal:

    $ printf '\342\236\234\n'
    ➜
    

    So, it seems that the multi-term in Emacs doesn't support UTF-8 (or check your locales and your settings). You can redefine the prompt by setting the PS1 variable. For instance:

    PS1="%m%#"
    

    (see the zshmisc(1) man page for the prompt sequences).