Last active
May 21, 2016 12:21
-
-
Save ricklancee/f3af013b12c9ac3512d6d7741dc6f2a9 to your computer and use it in GitHub Desktop.
Custom oh my zsh theme based on suvash
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
function prompt_char { | |
echo '$' | |
} | |
function virtualenv_info { | |
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' | |
} | |
function collapse_pwd { | |
echo $(pwd | sed -e "s,^$HOME,~,") | |
} | |
if which rvm-prompt &> /dev/null; then | |
PROMPT='%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) %{$reset_color%}%{$fg[red]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%} | |
$(virtualenv_info)$(prompt_char) ' | |
else | |
if which rbenv &> /dev/null; then | |
PROMPT='%{$reset_color%}%{$fg[red]%}$(rbenv version | sed -e "s/ (set.*$//")%{$reset_color%} | |
$(virtualenv_info)$(prompt_char) ' | |
fi | |
fi | |
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="" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment