Using zsh as your shell


#安装zsh
#下载zsh源代码
#下载最新发行版zsh源代码http://www.zsh.org/pub/zsh.tar.gz,解压后进入zsh源代码目录。

#配置zsh编译安装选项
#这里,主要设置zsh的安装目录,让zsh安装在用户目录下,供用户访问
./configure --prefix=$HOME/
#编译安装
make && make install

#zsh默认会安装到$HOME/bin目录下.
#默认shell
#在主目录下的.bash_profile或.bashrc中添加如下代码:
export PATH=$PATH:$HOME/bin   # 添加PATH
export SHELL=`which zsh`      # 设置$SHELL为zsh
exec `which zsh` -l           # 设置登录为zsh
source ~/.bashrc

oh-my-zsh

install oh-my-zsh which is the most popular plugins framework which give you much more plugins to facilitate your use of shell

sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

And the plugins could be installed in the path ~/.oh-my-zsh/custom/plugins from their github categories. And you could choose your favorite. Install them in the directory ~/.oh-my-zsh/theme, and set your .zshrc ZSH_THEME="theme/name"

Auto-suggestions

zsh-autosuggestions is a useful command history tool, and you could install it through command git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions. And add plugins = (... zsh-autosuggestions), source it through source ~/.zshrc.

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

Author: Wulilichao
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint policy. If reproduced, please indicate source Wulilichao !
  TOC