Mac OSX By default bash shell, When you type a command , The display of the document is not colored .
While using zsh shell+Oh My Zsh The theme , It can make our terminal stand tall in an instant .
bash shell The default read is under the current user .bash_profile file , and zsh shell The default read is under the current user .zshrc file .
This paper mainly introduces the use of zsh as well as oh-my-zsh Configuration of .
1.Mac OSX The default is bash shell, We need to switch to zsh , Use the following command to switch
chsh -s /bin/zsh
2. install （ There are several ways to install ）
2.1 The official installation method
//Install oh-my-zsh via curl
$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzs...)"
//Install oh-my-zsh via wget
$ sh -c "$(wget https://raw.github.com/ohmyzs... -O -)"
2.2 How to use most of the online tutorials
curl -L https://raw.github.com/robbyr... | sh
2.3 Go by yourself github Download manually or I provide the network disk （ reply 【Oh-My-Zsh】）, I've tried both of them , It didn't work , So in github Download and install .
Download the , Then extract the file , Get into tools` Catalog . Execute the following command ：
Just wait for it to finish （ If you need a password , Just type in ）.
3. To configure Oh My Zsh
Configuration item ZSH_THEME That is to say oh-my-zsh Theme configuration for ,oh-my-zsh Of GitHub Wiki The page provides List of topics
open oh-my-zsh The configuration file
Search for ZSH_THEME Find the theme configuration , As shown in the figure below , When set to ZSH_THEME=random when , Each time you open the terminal, you use a random theme .
In the end, I chose agnoster This theme , Applying this theme requires special font support , Otherwise, there will be disorder , Now let's configure the font ：
1. Use Meslo typeface , Click on the link and click view raw Download Fonts .
2. Install fonts into the system font book .
3. The terminal uses Fonts . Exit the terminal completely .
4. Reopen the terminal window , Now you can see the effect .
4.solarized The color scheme
Baidu network disk compression package . This color scheme is included in the package and is used on a variety of platforms 、 terminal 、 Configuration file of software . Find your own terminal folder . If I use Mac Terminal, Then in osx-terminal.app-colors-solarized This folder , The inside Solarized Dark ansi.terminal File import to terminal .
After importing the color scheme in the configuration of the terminal , And that's what happened Solarized Dark Options , Set it as the default , Reopen the terminal , There's a basic color scheme .