3

iTerm2

Using iTerm2. Installed zsh, spaceship-prompt and FiraCode.

Why is the width of ~ different than ?

2
  • How did you enter the arrow symbol? What Unicode point is it? – mmmmmm Aug 28 '19 at 15:16
  • Because you are using a THEME to customise it. This is defined on the shell variable $PS1 . try echo $PS1 and you will see where it is defined. Change it by editing ~/.zshrc. About the width, is because the font used is not a monospaced font. – Prado Aug 28 '19 at 19:37
5

Ok, found what’s going on... SPACESHIP_CHAR_SYMBOL is set to (Heavy Round-Tipped Rightwards Arrow, unicode U+279C) by default vs (Rightwards Arrow, unicode U+2192) which has the right width. PR in the making.

Submitted a PR to spaceship-prompt.

3

Prompt is defined on the shell variable $PS1

try echo $PS1 and you will see its definition. Change it by editing ~/.zshrc if you want.

About the width, it is because the font used on your terminal is not a monospaced font. Choose any monospaced, or fixed-size font, if you want all character to be the same width.

4
  • Thanks for your feedback. I believe FiraCode is a monospaced font... but somehow my terminal doesn’t look like the following (somehow is wider than ~). github.com/denysdovhan/spaceship-prompt/blob/master/docs/… – sunknudsen Aug 28 '19 at 20:03
  • 1
    Sorry, you didn't specified the font, so I assumed it was not a monospaced font :( – Prado Aug 29 '19 at 0:32
  • I had mentioned FiraCode but, admittedly, it’s not obvious that it’s a font. Thanks for trying to help. :) – sunknudsen Aug 29 '19 at 8:57
  • You are welcome – Prado Aug 29 '19 at 9:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .