使用mac osx一年以来,自带的Terminal终端一直都是白底黑字,食之无味,愈来愈缺少新鲜感,怎么也得想个法子来刺激下眼球。
否则花那么多大洋买你回来是要哪般,难道真是为来学习工做???
怎么可能,不装逼谁TM买苹果。。。好吧,其实为来工做学习,装逼纯属业余。git
完成配置后的终端具有功能:github
选用 solarized,下载解压,而后打开 iTerm2 下的偏好设置 preference ,点开 profiles 下的colors 选项,点击右下角的 Color Presets 选项,选择import ,导入解压到的 solarized 文件下的Solarized Dark.itermcolorsvim
github:https://github.com/robbyrussell/oh-my-zsh
官方提供 curl 和 wget 两种安装方式
curl 安装:sh -c
`"$(curl -fsSL https://raw.github.com/robbyr...)"`
wget安装:sh -c
`"$(wget https://raw.githubusercontent... -O -)"`ruby
安装oh-my-zsh成功后bash
vi ~/.zshrc
ZSH_THEME="agnoster"
将zsh主题修改成“agnoster”curl
使用 Meslo 字体,点开连接点击 view raw 下载字体ide
比iTerm2自带的更强大的命令提示与补全工具
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
学习
plugins=(git)
,咱们把它修改成plugins=(zsh-autosuggestions git)
PS:当你从新打开终端时可能看不到变化,可能你的字体颜色太淡了,咱们把其改亮一些:字体
cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=10'
brew install zsh-syntax-highlighting
若是电脑上尚未安装homebrew,请先安装homebrew/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
source /xxx/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
(注意: /xxx/ 表明.zshrc所在的路径)
source ~/.zshrc
chsh -s /bin/zsh
chsh -s /bin/bash
oh my zsh
,在命令行输入:uninstall_oh_my_zsh
编辑~/.oh-my-zsh/themes/agnoster.zsh-theme
主体文件,将里面的build_prompt
下的prompt_context
字段在前面加#
注释掉便可
做者:以乐之名 本文原创,有不当的地方欢迎指出。转载请指明出处。