Skip to content

Instantly share code, notes, and snippets.

@roryhardy
Last active December 16, 2015 15:38
Show Gist options
  • Save roryhardy/5456813 to your computer and use it in GitHub Desktop.
Save roryhardy/5456813 to your computer and use it in GitHub Desktop.
My oh-my-zsh theme.
# This theme is a derivation of the robbyrussell theme.
# Context: user@hostname (who am I and where am I)
prompt_context() {
local user=`whoami`
if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
echo -n "$user@%m:"
fi
}
PROMPT='$(prompt_context)%{$fg[cyan]%}%c%{$fg_bold[red]%}$%{$fg_bold[blue]%}$(git_prompt_info) %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment