Skip to content

Instantly share code, notes, and snippets.

@bsormagec
Forked from brunojabs/jabs_bash_profile.bash
Last active August 29, 2015 14:23
Show Gist options
  • Save bsormagec/dbef6e221af0cafcfe7a to your computer and use it in GitHub Desktop.
Save bsormagec/dbef6e221af0cafcfe7a to your computer and use it in GitHub Desktop.
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
show_git_branch() {
_branch="$(git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/')"
test -n "$_branch" && echo -e " $_branch"
}
show_date()
{
echo "$(date +%T)"
}
# prompt with ruby version
show_ruby_version()
{
echo "$(ruby -e 'print RUBY_VERSION')"
}
show_dev_info() {
echo "($(show_ruby_version)$(show_git_branch))"
}
# colors
Black='\e[0;30m'
Red='\e[0;31m'
LightRed='\e[1;31m'
Green='\e[0;32m'
LightGreen='\e[1;32m'
Yellow='\e[0;33m'
Blue='\e[0;34m'
Purple='\e[0;35m'
Cyan='\e[0;36m'
White='\e[0;37m'
PS1="\[$Yellow\][\u \$(show_date)] \[$White\]\w\[$Green\]\$(show_dev_info)\[$Yellow\]⚡\[$White\] "
#Aliases
alias gst='git status '
alias rs='rails s '
alias rc='rails c '
alias migrate="rake db:migrate db:rollback && rake db:migrate"
alias m="migrate"
alias work='cd ~/Work/'
alias eclipse='UBUNTU_MENUPROXY= /home/bruno/adt-bundle-linux-x86_64-20140321/eclipse/eclipse'
alias pycharm='~/Downloads/pycharm-3.1.3/bin/pycharm.sh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment