Mac 命令行配置
程序员文章站
2024-01-10 09:12:10
...
配置:autojump、zsh-syntax-highlighting、zsh-autosuggestions
- 安装 zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
- 将zsh设置成默认的shell
chsh -s /bin/zsh
- 安装 autojump
# 安装完使用 j+目录名 跳转
brew install autojump
- 安装语法高亮
brew install zsh-syntax-highlighting
- 安装命令提示
brew install zsh-autosuggestions
- 修改zsh配置
vim ~/.zshrc
#配置插件
plugins=(
git
autojump
zsh-syntax-highlighting
zsh-autosuggestions
)
#导入插件
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /usr/local/share/autojump/autojump.zsh
#设置别名 alias 可以自定义