Skip to content

Instantly share code, notes, and snippets.

@njj
Created April 23, 2013 17:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save njj/5445754 to your computer and use it in GitHub Desktop.
Save njj/5445754 to your computer and use it in GitHub Desktop.
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}$fg[white]]%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY_PREFIX="%{$fg[yellow]%}("
ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX
ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX
ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY
ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN
vcs_status() {
if [[ ( $(whence in_svn) != "" ) && ( $(in_svn) == 1 ) ]]; then
svn_prompt_info
else
git_prompt_info
fi
}
function get_pwd() {
echo "${PWD/$HOME/~}"
}
PROMPT='$fg[yellow]$(get_pwd) $(vcs_status)
$fg[cyan]→%b '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment