Created
October 5, 2012 19:31
-
-
Save rhenning/3841858 to your computer and use it in GitHub Desktop.
My zsh theme
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
# Hack of robbyrussell's theme, with RVM & Git indicators, but no host indicator | |
# Example: | |
# ✻ currentdir rvm:rubyversion@gemset git:branchname ✗ | |
# Get the current ruby version in use with RVM: | |
if [ -e ~/.rvm/bin/rvm-prompt ]; then | |
RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:%{$fg[cyan]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%}%{$reset_color%} " | |
else | |
if which rbenv &> /dev/null; then | |
RUBY_PROMPT_="%{$fg_bold[blue]%}rbenv:%{$fg[cyan]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%}%{$reset_color%} " | |
fi | |
fi | |
# Get the host name (first 4 chars) | |
HOST_PROMPT_="%{$fg_no_bold[yellow]%}✻ %{$fg_bold[green]%}%c " | |
GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}" | |
PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT " | |
ZSH_THEME_GIT_PROMPT_PREFIX="git:%{$fg[cyan]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%} %{$fg[red]%}✗%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%} %{$fg[green]%}✓%{$reset_color%}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment