下载安装 iTerm2
homebrew
设置ITerm为默认终端
点击左上角iTerm2,然后点击Make iTerm2 Default Term
安装oh-my-zsh,查看系统有几个shell
$ cat /etc/shells
设置默认 shell
$ chsh -s /bin/zsh
使用crul安装 oh-my-zsh
官网地址: ohmyz.sh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
安装常用的插件 (高亮 制动补全)
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
记得 open ~/.zshrc
设置 .zshrc 文件里面的 plugins
plugins=(git z compleat zsh-autosuggestions zsh-syntax-highlighting)
这一步就是安装完成了 source ~/.zshrc 使用此命令刷新下 再输入命令就能看到补全命令的功能
安装 Powerlevel10k 主题设置
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k
echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>~/.zshrc
- 编辑
open ~/.zshrc设置ZSH_THEME="powerlevel10k/powerlevel10k" - 安装完成后记得
source ~/.zshrc使用此命令刷新下 - 然后就可以 使用
p10k configure命令愉快的配置了