版权声明:本文为博主原创文章,可以自由转载。 https://blog.csdn.net/u010953692/article/details/90673979
macOS 安装 iTerm2
1,下载iTerm2
2,安装oh-my-zsh
- zsh 版本
$ zsh --version
zsh 5.3 (x86_64-apple-darwin18.0)
- shell 环境
$ echo $SHELL
/bin/bash
- 安装了哪些shell
$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
- 切换到 zsh 退出重新打开
$ chsh -s /bin/zsh
- 安装 oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
3,切换zsh主题
- 主题修改为gnzh,重新打开一个终端
cat .zshrc
# ZSH_THEME="robbyrussell"
ZSH_THEME="gnzh"
4,安装 PowerLine
pip3 install powerline-status --user
5,安装 PowerFonts
git clone https://github.com/powerline/fonts.git --depth=1
cd fonts
╰─➤ ./install.sh
Copying fonts...
Powerline fonts installed to /Users/y50/Library/Fonts
6,安装代码高亮插件
cd ~/.oh-my-zsh/custom/plugins
╰─➤ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
╰─➤ vim ~/.zshrc
plugins=(
git
zsh-syntax-highlighting
)
source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
╰─➤ sort ~/.zshrc
7,安装命令补全
╰─➤ cd ~/.oh-my-zsh/custom/plugins
╰─➤ git clone https://github.com/zsh-users/zsh-autosuggestions
╰─➤ cat ~/.zshrc
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
参考: