Hello World

吞风吻雨葬落日 欺山赶海踏雪径

0%

Linux install zsh

Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.

安装zsh

1
2
sudo apt install zsh
chsh -s /usr/bin/zsh

安装Oh-my-zsh

1
sh -c "$(curl -fsSL https://ghproxy.cc/https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

国内镜像

1
2
3
sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh \
| sed 's|^REPO=.*|REPO=${REPO:-mirrors/oh-my-zsh}|g' \
| sed 's|^REMOTE=.*|REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}|g')"

可以修改更新策略~/.zshrc配置

1
zstyle ':omz:update' mode disabled

zsh-syntax-highlighting

1
2
3
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

git clone https://gitee.com/eralmtice/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

zsh-autosuggestions

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

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

修改~/.zshrc文件

1
2
3
4
5
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)

应用配置

1
source ~/.zshrc