Skip to content

Instantly share code, notes, and snippets.

@nyaray
Created May 8, 2012 08:41
Show Gist options
  • Save nyaray/2633624 to your computer and use it in GitHub Desktop.
Save nyaray/2633624 to your computer and use it in GitHub Desktop.
Le theme.
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="%F{red}●%f "
ZSH_THEME_GIT_PROMPT_CLEAN=""
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
local cb=$(current_branch)
if [ -n "$cb" ]; then
echo "$ZSH_THEME_GIT_PROMPT_PREFIX$(parse_git_dirty)%F{blue}$(current_branch)%f$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi
}
PROMPT='$fg_bold[blue][ $fg[red]%T $fg_bold[blue]] $fg_bold[blue]
»%b '
RPROMPT='$(git_custom_status) %~ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment