Skip to content

[~] .bash_profile

January 28, 2012

I’ve configured my .bash_profile for displaying gemset, git completion and colored git branches in terminal command prompt:

The code in .bash_profile:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
#Git tab completion
source ~/git-completion.bash

export CLICOLOR=2
export TERM=xterm-color

function rvm_version {
local gemset=$(echo $GEM_HOME | awk -F’@’ ‘{print $2}’)
[ “$gemset” != “” ] && echo “@$gemset”
local ruby_version=$(echo $MY_RUBY_HOME | awk -F’-‘ ‘{print $2}’)
[ “$ruby_version” != “” ] && ruby_version=”$ruby_version”
local full=”$ruby_version” #$gemset
[ “$full” != “” ] && echo “$full ”
PS1=’\[33[1;34m\]$(rvm_version)\[33[0m\]\n[\W$(__git_ps1 “33[0;33m\] (%s)\[33[0m\]”)]\$ ‘
#export PROMPT_COMMAND=’echo -ne “33]0;${PWD/#$HOME/~}07″‘

From → RoR

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: