下面三个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/themesrandom,每次新开个tab/window 时会使用随机主题
比较喜欢的主题是# 查看当前的随机主题 echo $RANDOM_THEMEsunaku - 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

本文详细介绍如何将Mac默认的Terminal替换为iTerm2,并用zsh取代bash作为默认shell。涵盖oh-my-zsh的安装配置,Powerline字体安装,以及iTerm2的配色方案调整,提升开发效率。
2018

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



