https://gist.github.com/kevin-smets/8568070需要安装字体。
Install a patched font
Meslo (the one in the screenshot ). Click "view raw" to download the font.
https://github.com/powerline/fonts/blob/master/Meslo/Meslo%20LG%20M%20DZ%20Regular%20for%20Powerline.otfOthers @ powerline fonts
Open the downloaded font and press "Install Font".
Set this font in iTerm2 (14px is my personal preference ) (iTerm -> preferences -> profiles -> text ).
Regular Font -> "Change Font"
Non-ASCII Font -> "Change Font"
Restart iTerm for all changes to take effect.