1. 下载zsh
先查看是不是下载过zsh
zsh --version
如果没有则
brew install zsh
# 将zsh设置为默认
chsh -s /usr/local/bin/zsh
2. 下载iterm2
https://iterm2.com/

3. 安装oh-my-zsh
export REMOTE=https://gitee.com/imirror/ohmyzsh.git
sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ohmyzsh/ohmyzsh/tools/install.sh)"
# 插件:语法补全、语法高亮
git clone https://gitee.com/imirror/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://gitee.com/imirror/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
vim打开~/.zshrc找到plugins改为下面
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
使设置生效
source ~/.zshrc
4. 显示工作目录绝对路径
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
改为
PROMPT+=' %{$fg[cyan]%}[$PWD]%{$reset_color%} $(git_prompt_info)'

7621

被折叠的 条评论
为什么被折叠?



