Last active
December 26, 2015 11:49
-
-
Save jsmecham/7146112 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# 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