下面三个blog 差不多:
总结:
-
iTerm2 替代 mac 默认terminal
-
zsh 替代 bash
# 改成zsh chsh -s /bin/zsh # 回到bash chsh -s /bin/bash
-
# curl 方式安装: sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" # bash sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
-
Powerline fonts
如果不安装这个东东,后面选择zsh的一些主题时,会乱码git clone https://github.com/powerline/fonts.git --depth=1; cd fonts; ./install.sh; cd ..; rm -rf fonts
然后在 iTerm2 中选择字体和配色
-
更改 ~/.zshrc 的设置
- theme
也可以把 theme 设置成# 列出所有可用theme ls ~/.oh-my-zsh/themes
random
,每次新开个tab/window 时会使用随机主题
比较喜欢的主题是# 查看当前的随机主题 echo $RANDOM_THEME
sunaku
- user 提示
DEFAULT_USER="user"
- theme
-
zsh 插件
-
zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
然后修改 .zshrc, 在plugin 里面加入
zsh-syntax-highlighting
-
zsh-autosuggestions , 感觉没太大必要
-
-
iTerm2 默认的配色比较难看
可以改成这个配色,下载文件或者clone repo,然后在iTerm2 的color 设置中,点击importhttps://github.com/mbadolato/iTerm2-Color-Schemes/blob/master/schemes/Solarized%20Dark%20Higher%20Contrast.itermcolors