oh my zsh showing weird character '?' on terminal

只愿长相守 提交于 2019-12-03 10:52:32

Installing a powerline patched font will solve this. This official documentation provides description about installing poweline fonts.

There are two ways to enable powerline patched font in iTerm2.

  1. Set a powerline patched font as default.

  1. Set a powerline patched font for only Non-ASCII characters and use another font for code.

Bonus:

Run step 1-3 in your iterm2/terminal

  1. git clone https://github.com/powerline/fonts (clone it anywhere, You can remove cloned dir after step-4)
  2. cd fonts
  3. ./install.sh
  4. Open iTerm2->Preferences->Profiles->Text->Change Font-> Meslo LG S DZ Regular for Powerline

Reopen the terminal and you are done.

You can also refer this thread on git about the same.

The solution is to use a prepatched font. Point 6 of this article describes the solution.

On Windows - just * download some Powerline font like: https://github.com/abertsch/Menlo-for-Powerline/raw/master/Menlo%20for%20Powerline.ttf
* Install it by clicking the file twice
* Choose the new font in properties
That's it!

On Mac - the previous answer in totally correct, just install and choose an appropriate font.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!