AI 摘要
讲解如何安装zsh及oh-my-zsh,包括切换shell、安装主题、自动补全插件zsh-autosuggestions和语法高亮插件zsh-syntax-highlighting,并配置自定义设置。
一、安装
- 安装切换
shell 的工具、zsh
1
| sudo dnf install -y util-linux-user zsh
|
- 切换
zsh
二、oh-my-zsh
官网
-
安装
1
| sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
1
| sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
|
- 安装主题
1
| git clone https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k
|
- 安装插件
- zsh-autosuggestions自动补全插件
1
| git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
- zsh-syntax-highlighting语法高亮插件
1
| git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
- 启用主题和插件
1 2 3 4 5 6 7 8 9
| ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=( git zsh-autosuggestions zsh-syntax-highlighting )
|
- 配置自定义的设置
会一次问一堆问题: