美文网首页
zsh oh-my-zsh

zsh oh-my-zsh

作者: e8a37405cb53 | 来源:发表于2017-05-01 18:35 被阅读0次

    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/

    相关文章

      网友评论

          本文标题:zsh oh-my-zsh

          本文链接:https://www.haomeiwen.com/subject/obxqtxtx.html