shell配置
...小于 1 分钟
安装zsh 并设置
sudo apt install zsh -y
# 设置为默认shell
sudo chsh -s $(which zsh)
安装oh-my-zsh
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
设置主题
vim ~/.zshrc
# 将 ZSH_THEME="robbyrussell" 修改为 ZSH_THEME="ys"
# 重新加载配置
source ~/.zshrc
安装配置oh-my-zsh插件
- autosuggestion插件
- 根据历史命名进行填充
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
- 编辑zshrc添加插件
vim ~/.zshrc
- 重新加载配置
source ~/.zshrc
- 修改配置字体改亮
- ``cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
vim zsh-autosuggestions.zsh
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10'
- 语法高亮插件
sudo apt install zsh-syntax-highlighting
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
source ~/.zshrc
Powered by Waline v3.1.3