Mac ITerm with Powerline

Source: Internet
Author: User

1. Download Iterm,

Address: http://www.iterm2.com/

Can completely replace the Mac comes with the terminal.

2. Before I had oh-my-zsh,

git clone git://github.com/lokaltog/powerline.git

Edit my ~/.ZSHRC file,

Zsh_theme= "Powerline" #改成这个, and then source ~/.ZSHRC

3. Need font support, otherwise the sharp corner you want to show garbled.

git clone https://github.com/powerline/fonts.git ~/powerline-fonts

Install required.

Choose the font you like in Iterm.

4. Why is that path so long? Oh, it has to be Powerline-shell, a python-written support for Python2 and 3.

Reference here can also: https://linux.cn/article-5249-1.html

But I'm git clone, process as Https://github.com/banga/powerline-shell

5. But for me personally, the username on the shell, and host are not very significant (I do not know I am healer), that time is even more useless.

So, change the configuration:

I joined in ~/.ohmyzsh-powerlinecd/powerline.zsh-theme.

Powerline_right_a= "Exit-status-on-fail" # This change is not necessary.

powerline_disable_rprompt= "Hide" #我觉得右侧的时间显示没啥意思, and when split screen, there are not so many places.

My machine's hostname too long, want to remove, found that this file is useless. Because it was handled by Powerline-shell.

Change ~/powerline-shell.py

Search Add_username_segment and Add_hostname_segment,

Finally, I choose to keep only healer this display.

In addition

This code is put into your. ZSHRC Inside:

function Powerline_precmd () {Export PS1="$ (~/powerline-shell.py $?--shell zsh 2>/dev/null)"}function Install_powerline_precmd () { forSinch "${precmd_functions[@]}"; doif["$s"="Powerline_precmd" ]; Thenreturnfi done Precmd_functions+=(powerline_precmd)}install_powerline_precmd

Mac ITerm with Powerline

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.