zsh oh-my-zsh

2017-05-01  本文已影响0人  e8a37405cb53

zsh完全兼容bash,用起来十分方便,赶快试试吧,你会喜欢的!
安装 zsh

sudo yum install zsh
chsh -l 查看shell
chsh -s /bin/zsh

安装 oh-my-zsh

wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh
plugins=(git git-flow grails rvm history-substring-search github gradle svn node npm zsh-syntax-highlighting sublime)

vim .zshrc

ZSH_THEME="candy" #主题
ENABLE_CORRECTION="true" #命令自动校正

更改过的candy
vim ~/.oh-my-zsh/themes/candy.zsh-theme

PROMPT=$'%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%D{[%X]} %{$reset_color%}%{$fg[white]%}%~%{$reset_color%} $(git_prompt_info)\
%{$fg[blue]%}->%{$fg_bold[blue]%} %#%{$reset_color%} '

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""

参考:
http://hupengfei.com/archives/421
https://github.com/robbyrussell/oh-my-zsh
http://lostjs.com/2012/09/27/zsh/

上一篇下一篇

猜你喜欢

热点阅读