Mac Osx:powerline-style zsh configuration

Source: Internet
Author: User

The tools you need
    1. ITerm, an alternative to the X-band terminal software, based on ITerm to achieve the above effect;
    2. Oh-my-zsh,zsh is the most powerful shell on OSX, not one, but the configuration process is complicated, and this script can help you configure it with one click.
    3. The powerline theme, based on the oh-my-zsh theme, is the effect above.
ITerm

Currently the latest version is iterm2,http://iterm2.com/, this is nothing to say, after the decompression to throw into the application, and then you can bring the system comes from the terminal from the dock bar removed ~

Oh-my-zsh

You'll need to install git before you install it manually, not here, Google, or use automatic installation.

    • Automatic installation
https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh`

Download the above script and execute it.

    • Manual Installation
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zshcp ~/.oh-my-zsh/tmplates/zshrc.zsh-template ~/.zshrc

is not very complex, the installation will open the Terminal (iTerm) window, but this time the terminal seems to be not very good looking, because it is using the theme of its own, next we will change on our tall powerline theme ~

Powerline Themes

There are two ways to install the same:

    • Automatic installation
git clone git://github.com/jeremyFreeAgent/oh-my-zsh-powerline-theme ~/.ohmyzsh-powerlinecd ~/.ohmyzsh-powerline./install_in_omz.sh

The principle of the automatic installation script is git clone down this project, and then create a symbolic link in the Oh-my-zsh theme folder, in fact, we can directly put the theme file into the theme package, do not have to keep ~/.ohmyzsh-powerline this folder If you wish to do so, use the manual installation below.

    • Manual Installation

Manually download the zip package, put powerline.zsh-theme in ~/.oh-my-zsh/themes/, or execute the script below.

  git clone Git://github.com/jeremyfreeagent/oh-my-zsh-powerline-theme ~/.ohmyzsh-powerlineCD Span class= "pun" >~/. ohmyzsh-POWERLINECP powerline. Zsh-theme ~/.oh-my-zsh/ themes/powerline. Zsh-themerm -rf ~/.< Span class= "PLN" >ohmyzsh-powerline       

Then open the ~/.ZSHRC, the Zsh_theme= "Robbyrussell" to Zsh_theme= "powerline" changed the theme, restart Iterm, you can see the effect ~

Configure Powerline

Now the powerline theme has been a little embryonic, and a little bit of a problem.

    1. In order to show the powerline style, it uses some special symbols to display the arrows, the system comes with the font does not support, so you need to manually download someone else packaged fonts, is http://github.com/powerline/fonts, Execute the install.sh inside, then select the font you like in the Iterm settings.

    2. The default color looks a little strange, we can adjust the iterm to the ANSI color implementation color, I changed the background color and blue, change the font size and so on.

Finally, it's done!

Mac Osx:powerline-style zsh configuration

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.