安装zsh
安装字体
| sudo apt install fonts-powerline fonts-font-awesome |
安装on-my-zsh
| wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh |
| sh install.sh |
powerlevel10k
安装powerlevel10k
| git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k |
设置powerlevel10k
| nvim ~/.zshrc |
| |
| ZSH_THEME="powerlevel10k/powerlevel10k" |
| source ~/.zshrc |
配置powerlevel10k
插件安装
- 历史命令提示: zsh-autosuggestions
| git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions |
- Tab补全: zsh-completions
| git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions |
- shell高亮增强: zsh-syntax-highlighting
| git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting |
zshrc中加载插件
| nvim ~/.zshrc |
| |
| plugins=( |
| git |
| zsh-completions |
| zsh-autosuggestions |
| zsh-syntax-highlighting |
| ) |
默认使用zsh 注销或重启后生效
本文作者:南方与南
本文链接:https://www.cnblogs.com/jingpengblog/p/18754156
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步