Skip to content

Instantly share code, notes, and snippets.

@jsmecham
Last active December 26, 2015 11:49
Show Gist options
  • Save jsmecham/7146112 to your computer and use it in GitHub Desktop.
Save jsmecham/7146112 to your computer and use it in GitHub Desktop.
#
# Justin's "Staple" ZSH Theme
#
# For use with Oh-My-Zsh. Place in ~/.oh-my-zsh/custom.
#
autoload -U add-zsh-hook
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[%{$fg_no_bold[green]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[blue]%}] "
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg_bold[red]%}*%{$fg_bold[blue]%}] "
add-zsh-hook precmd staple_precmd
function staple_precmd() {
if [[ -n $SSH_CLIENT || -n $REMOTEHOST ]] then
PROMPT="%B%{${fg[yellow]}%}%m%b%{$fg[default]%} %~ %{${fg[green]}%}$(git_prompt_info)%{$fg[default]%}%# "
else
PROMPT="%~ %{${fg[green]}%}$(git_prompt_info)%{$fg[default]%}%# "
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment