非root用户自定义路径安装zsh+powerlevel10k+插件
安装zsh
- 下载zsh源码
- xz -d zsh-5.9.tar.xz
- tar -xvf zsh-5.9.tar
- cd zsh-5.9/
- ./configure --prefix=自定义路径
- make && make install
安装oh my zsh
- vi ~/.bash_profile 在末尾添加:
export SHELL=/自定义路径/zsh/bin/zsh
exec /自定义路径/zsh/bin/zsh -l
- 指定路径安装,
wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
ZSH="$HOME/.dotfiles/oh-my-zsh"
sh install.sh
安装powerlevel10K
- 下载到omz主题目录
cd $PATH/oh-my-zsh/themes
git clone --depth=1 https://gitee.com/romkatv/powerlevel10k.git ./
- 启动主题
vi ~/.zshrc
更新为:ZSH_THEME="powerlevel10k/powerlevel10k"
- 配置主题,重新打开一个窗口,按提示配置
安装其他插件
我安装的插件为:plugins=(colored-man-pages zsh-syntax-highlighting python cp extract z zsh-autosuggestions)
插件按照方法参见:https://segmentfault.com/a/1190000039860436

浙公网安备 33010602011771号