Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 28 lines (23 sloc) 1.132 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
# prose.zsh-theme
# Most of this was taken from http://blog.andrewhays.net/love-your-terminal,
# which was in turn based on http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/

# Determine what character to use in place of the '$' for my prompt.
function repo_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
echo '⚡'
}

# Display any virtual env stuff with python.
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
}

# All of my git variables.
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
ZSH_THEME_GIT_PROMPT_CLEAN=""

# I like a new line between my result and the next prompt. Makes it easier to see
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info)
$(virtualenv_info)$(repo_char) '

# Display the date. (My desktop at work uses $(date -u ...) instead, because I use UTC a lot at work.
RPROMPT='$(date "+%x %T %Z")'
Something went wrong with that request. Please try again.