oh my zsh安装及配置
1. 安装
- 首先要安装zsh,如果系统没有,就装一下
sudo apt install zsh
- 可以使用官方提供的安装方式,
或者使用源码安装wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh sh install.sh
git clone https://github.com/ohmyzsh/ohmyzsh.git cd ./ohmyzsh/tools sh install.sh
2. 配置插件
- 先下载两个常用的插件
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/plugins/zsh-syntax-highlighting
- 修改配置文件
vim ~/.zshrc
,添加几个插件plugins=( git extract z zsh-autosuggestions zsh-syntax-highlighting )
extract
用于解压任何压缩文件,不必根据压缩文件的后缀名来记忆压缩软件;
z
可以直接跳转到曾经去过的文件夹, 和autojump
功能差不多,但是z
是ohmyzsh自带的,不需要额外安装;
zsh-autosuggestions
用来自动提示命令,操作终端更方便;
zsh-syntax-highlighting
高亮现实命令。
3. 主题推荐
推荐几个好看的主题
bira
ys