一、Introduction #
Zsh is a shell designed for interactive use, although it is also a powerful scripting language. Many of the useful features of bash, ksh, and tcsh were incorporated into zsh; many original features were added.
二、Configuration #
- zsh
- ohmyzsh, zsh-autosuggestions, zsh-syntax-highlighting
# For Fedora
sudo dnf install zsh
# For Ubuntu
apt install zsh
# For macOS
brew install zsh
# For CentOS
sudo yum update && sudo yum -y install zsh
Make it your default shell: chsh -s $(which zsh)
or use sudo lchsh $USER
if you are on Fedora. Or chsh -s /bin/zsh
.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
config plugins zsh-autosuggestions plugin
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
config .zshrc
# config theme
ZSH_THEME="afowler"
plugins=(git zsh-autosuggestions zsh-syntax-highlighting z)
after configured, exec
source .zshrc