效果图
安装 zsh
1
| wget https://raw.fastgit.org/romkatv/zsh-bin/master/install
|
修改该文件内的仓库地址为 hub.fastgit.org
,然后运行
1 2 3
| ... readonly url_base=https://hub.fastgit.org/romkatv/zsh-bin/releases/download/.... ...
|
1 2
| chmod u+x install ./install
|
切换默认 Shell
1
| chsh -s /usr/local/bin/zsh # zsh安装目录
|
安装 oh-my-zsh
下载安装脚本
1
| wget https://raw.fastgit.org/robbyrussell/oh-my-zsh/master/tools/install.sh
|
修改安装脚本默认仓库地址为gitee
1 2 3 4 5
| # Default settings ZSH=${ZSH:-~/.oh-my-zsh} REPO=${REPO:-ohmyzsh/ohmyzsh} REMOTE=${REMOTE:-https://github.com/${REPO}.git} BRANCH=${BRANCH:-master}
|
1 2
| REPO=${REPO:-mirrors/oh-my-zsh} REMOTE=${REMOTE:-https://gitee.com/${REPO}.git}
|
运行它
1 2
| chmod u+x install.sh ./install.sh
|
修改主题为 powerlevel10k
1
| git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
修改主题为 powerlevel10k/powerlevel10k
,source一下
自定义 powerlevel10k 主题
由于文件过大,下载下面的 .p10k.zsh
到根目录便可
完成后 source 一下 .zshrc
文件