Skip to content

Instantly share code, notes, and snippets.

@felixhummel
Created April 18, 2011 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felixhummel/925647 to your computer and use it in GitHub Desktop.
Save felixhummel/925647 to your computer and use it in GitHub Desktop.
# load global bash completion
if [[ -f /etc/bash_completion ]]; then
. /etc/bash_completion
fi
# load everything under ~/.bash/
if [[ -d $HOME/.bash/ ]]; then
for f in $HOME/.bash/*; do
source $f
done
fi
# include binaries from $HOME/bin
export PATH=$PATH:$HOME/bin:$HOME/apps/code_swarm/bin:/usr/NX/bin
# set vim as default editor
vim=`which vim`
export EDITOR=$vim
export VISUAL=$vim
# tweak history
export HISTCONTROL=ignoreboth
export HISTSIZE=9999
export HISTIGNORE=ls:la:l:cd:pwd:clear:history:jobs:fg:bg:pushd*:popd*
# initialize java environment
export JDK_HOME=/usr/lib/jvm/java-6-sun
export JAVA_HOME=$JDK_HOME
# disable beep
[[ $TERM != "dumb" ]] && setterm -blength 0
# some color definitions
BLACK="\[\033[0;30m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[0;32m\]"
BROWN="\[\033[0;33m\]"
BLUE="\[\033[0;34m\]"
PURPLE="\[\033[0;35m\]"
CYAN="\[\033[0;36m\]"
LIGHT_GRAY="\[\033[0;37m\]"
DARK_GRAY="\[\033[1;30m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
YELLOW="\[\033[1;33m\]"
LIGHT_BLUE="\[\033[1;34m\]"
LIGHT_PURPLE="\[\033[1;35m\]"
LIGHT_CYAN="\[\033[1;36m\]"
WHITE="\[\033[1;37m\]"
NOTHING="\[\033[0m\]"
# set primary prompt string
PS1="$DARK_GRAY\h$PURPLE#\! $GREEN\w$LIGHT_GREEN\\$ $NOTHING"
# make git show status if changes pending
PROMPT_COMMAND='if [[ -d .git && $(git status --porcelain) != "" ]]; then echo "unclean"; fi'
# rvm
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# rvm completion
[[ -r $rvm_path/scripts/completion ]] && . $rvm_path/scripts/completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment