使用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
字段在前面加#
註釋掉便可
做者:以樂之名 本文原創,有不當的地方歡迎指出。轉載請指明出處。