The purpose of this paper is to provide a fang rate (bian) higher than zhuang bi terminal usage method for terminal users.

Install iTerm2

  1. Download iTerm2
  2. Perform routine installation

High kai (SHI) efficiency (zhuang) rate (BI)

Command line tooloh-my-zsh

  • oh-my-zshWhat is?

Oh-my-zsh is a community-driven command-line tool, and as its home page says, Oh-my-Zsh is a lifestyle. It is based on the ZSH command line, provides theme configuration, plug-in mechanism, and has built-in convenience. Give us a whole new way to use the command line. The interesting name oh-my-zsh is an extension toolset based on the ZSH command line that provides a wealth of extension features. Oh-my-zsh is just a configuration wrapper framework for the ZSH command line environment, but it does not provide a command line window and is not a standalone APP. For more information, see its home page oh-my-Zsh.

  • oh-my-zshHow to install it?
// Via curl
$ sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

// Via wget
$ sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Copy the code
  • oh-my-zshPersonalized configuration
  1. To change your favorite theme, you can search baidu for the configuration or use the theme 1 and 2 provided by the official
  2. Install the plug-in by installing the plug-inoh-my-zshMore powerful.Official Plugin 1,Official Plugin 2, I commonly use the following ones: (1)zsh-syntax-highlighting– Command highlighting (2)z– Fast jump to a path that has been entered before. The weight is adjusted according to the frequency

Command highlighted

Zsh-syntax-considering is a new method for considering commands on the command-line. For example, for considering commands, you should configure zsh-syntax-considering. Install zsh-syntac-considering if you’ve already installed OH-my-Zsh for considering, you should go through the following steps:

  1. Clone zsh-syntax-highlighting into the specified folder
// Clone this repository in 'oh-my-zsh's plugins directory
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
Copy the code
  1. in~/.zshrcAdd a plug-in to the plug-in list in
// Activate the plugin in `~/.zshrc` plugins=( [plugins...]  zsh-syntax-highlighting)
Copy the code
  1. compile~/.zshrcThen you can see the change
// Source `~/.zshrc` to take changes into account
$ source ~/.zshrc
Copy the code

Let iTerm2 become colorful

Let iTerm2 be implemented via coreutils.

  1. The installationcoreutils
// Install 'coreutils' via brew$ brew install xz coreutils
Copy the code
  1. Generate the color definition file
// Generate a color definition file$ gdircolors --print-database > ~/.dir_colors
Copy the code
  1. Open the~/.zshrc, add the following code where you like
if brew list | grep coreutils > /dev/null ; then
  PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
  alias ls='ls -F --show-control-chars --color=auto'
  eval `gdircolors -b $HOME/.dir_colors`
fi
Copy the code
  1. Compile the~/.zshrcAnd you can see the effect
// source ~/.zshrc
$ source ~/.zshrc
Copy the code

The attached

  1. iTerm2
  2. Use oH-my-Zsh to build your Hyperterminal
  3. Make Mac OS X terminals colorful

Title: [Mac] iTerm2 a better terminal to use

author: zhangpeng

Date: 2018.12.18

Making: github.com/fullstack-z…