Created
September 18, 2014 23:11
-
-
Save pjb3/d30712e127df3225b6fe 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
# Enable bash completion for rbenv commands | |
source ~/.rbenv/completions/rbenv.bash | |
__rbenv_ps1 () | |
{ | |
rbenv_ruby_version=`rbenv version | sed -e 's/ .*//'` | |
printf $rbenv_ruby_version | |
} | |
# Enable bash completion for git commands/branches | |
source /usr/local/etc/bash_completion | |
source /usr/local/etc/bash_completion.d/git-completion.bash | |
# Colors for prompt | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
WHITE="\[\033[1;37m\]" | |
BLACK="\[\033[0;30m\]" | |
OFF="\[\033[0m\]" | |
# Colorized prompt with rbenv version, git branch and current directory | |
export PS1="$RED\$(__rbenv_ps1) $GREEN\w$YELLOW\$(__git_ps1 "[%s]")$OFF \$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use this, first run this command: