zsh终端配合oh-my-zsh配置可以非常美观:
1、安装zsh
2、安装oh-my-zsh
1
| sh -c "$(curl -fsSL https://gitee.com/mirrors/oh-my-zsh/raw/master/tools/install.sh)"
|
3、设置主题
1
| git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
打开 ~/.zshrc 文件,然后设置主题:
1
| ZSH_THEME="powerlevel10k/powerlevel10k"
|
4、设置插件
1
| git clone https://gitee.com/makerinchina/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
1
| git clone https://gitee.com/makerinchina/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
1
| 按 z 可以列出历史目录,z + 目录关键字可以直接到达该目录;
|
在 ~/.zshrc 文件中配置插件:
1 2 3 4 5 6 7
| plugins=( ... z zsh-autosuggestions zsh-syntax-highlighting ... )
|
然后 source ~/.zshrc 启用