brogers /.bashrc

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

#-----------------------------------------
#------HISTORY START----------------------

# Expand the history size
HISTFILESIZE=100000000
HISTSIZE=100000
# Set to avoid spamming up the history file
HISTIGNORE="cd:ls:[bf]g:clear:exit"
# don't put duplicate lines in the history. See bash(1) for more options
export HISTCONTROL=ignoredups

# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

[ -x /usr/bin/most ] && export PAGER=most

# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
    debian_chroot=$(cat /etc/debian_chroot)
fi

#################
# Custom Prompt #
#################

PROMPT_HOSTNAME='ubuntu'
PROMPT_HOST_COLOR='1;31m'
PROMPT_DIR_COLOR='1;34m'
PROMPT_DEF_COLOR='0;39m'
ROOT_AT=''
# If I am root, set the prompt to bright red
if [ ${UID} -eq 0 ]; then
PROMPT_HOST_COLOR='41m'
PROMPT_DIR_COLOR='41m'
ROOT_AT='root@'
fi
case ${TERM} in
        vt100)
PS1='[\u@${PROMPT_HOSTNAME} \w]\n \#\$ '
        ;;
        *)
PS1='[\e[${PROMPT_HOST_COLOR}\[${ROOT_AT}\h:\[\e[${PROMPT_DIR_COLOR}\]\W\[\$\e[m]\n>'
        ;;
esac
#####################
# End Custom Prompt #
#####################

# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
    ;;
*)
    ;;
esac

# Alias definitions.
if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
fi

# enable programmable completion features 
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi
# search home directory as well as current directory when changing directory
export CDPATH=.:~/
export PATH=$PATH:~/bin
export RAILS_ENV='development'

complete -C ~/bin/rake_tab_completion -o default rake
complete -C ~/bin/sake_tab_completion -o default sake

export RUBYOPT=rubygems


if [ -f ~/.LifehackerTerminalTweaks ]; then
  source ~/.LifehackerTerminalTweaks
fi

# Used to be aliases until I turned them into funcs to provide 
# more functionality 
psg(){
  ps x | grep -v grep | grep $1 --color
}
#------------------------------------------
#-----------   gedit  ---------------------
#alias e='gedit'
function e(){
  gedit $1 &
}