Mac终端:iterm2 + oh my zsh
下载 iterm2
iterm2
包含许多设置项,可以自定义终端界面样式功能等。
下载 oh my zsh
Mac
下载命令:
bash
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
配置 oh my zsh
打开配置文件
bash
# 打开配置文件
vim ~/.zshrc
配置以下内容
bash
# 配置 ZSH 路径
export ZSH=$HOME/.oh-my-zsh
# ====== 以下在结尾处配置 ====
# 使默认的 .bash_profile 生效
export PATH=$HOME/bin:/usr/local/bin:$PATH
source ~/.bash_profile
# 使 .zshrc 生效
source $ZSH/oh-my-zsh.sh
使配置生效
bash
# 先保存 .zshrc 文件,在运行
source ~/.zshrc
配置主题
例如:
bash
ZSH_THEME=robbyrussell
配置插件
bash
# 例如
plugins=(nvm git yarn z zsh-syntax-highlighting zsh-autosuggestions)
以上插件需要单独安装
bash
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions