Personal blog address http://dandanlove.com/

ITerm2 + Oh-my-zsh + Solarized color scheme

Own Mac terminal color matching


Terminal color

Example Modify the terminal color matching of Mac addresses

#enables colorin the terminal bash shell
export export CLICOLOR=1
#sets up thecolor scheme for list
export export LSCOLORS=gxfxcxdxbxegedabagacad
#sets up theprompt color (currently a green similar to linux terminal)
#export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
#enables colorfor iTerm 
export TERM=xterm-color
Copy the code

The export PS1 = ‘\ [\ [01; 32 m \] 033 h \ u @ \ \ [\ [00 m \] 033: \ [\ [01; 36 m \] 033 \ w \ [\ [00 m \] \ $033’ is commented out.

Preparation before construction

  • ITerm is the most useful terminal for Mac. Click on the link to download the latest version.
  • Solarized Dark
  • oh-my-zshYou can usecurl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | shTo install
  • Monaco Powerline resolves the problem of garbled characters.

iTerm

Download & unzip and move to the Application file.

Solarized Dark

To unzip Solarized Dark, click Solarized \iterm2-colors- Solarized Dark. Itermcolors and Solarized Light. Itermcolors to install.


ITerm color scheme. JPG

Oh-my-zsh install agnoster theme

From the command line installation: curl -l https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh. Uninstall the oh-my-zsh command: uninstall_oh_my_zsh.

Vim ~/.zshrc // Go to the. ZSHRC file and change the ZSH_THEME field to agnosterCopy the code


Install agnoster theme.jpg

Monaco Powerline

Download and install.




ITerm changes the typeface. JPG

Set syntax highlighting –zsh-syntax-highlighting

Install zsh-syntax-highlighting plug-ins directly using Homebrew

brew install zsh-syntax-highlighting
Copy the code

Then, in the root directory.zshrc, insert the following:

source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
Copy the code

Hide user name information

The terminal usually has xxx@xxxdeMacbook-Pro before each line: we can hide it. Zsh-theme file: vim ~/.oh-my-zsh/themes/agnoster.zsh-theme


Hide user information.jpg

In code prompt_segment black default “%(! .%{%F{yellow}%}.) $USER@%m” $USER@%m”

Reference article: Most beautiful (iTerm2+ Oh-my-zsh color scheme) MAC – Transform your Terminal

The article here is all about the end, if there are other need to communicate can leave a message!!

To read more articles by the author, check out my personal blog and public account:


The revitalization of book city