#-------------------------------------------------------------
# Source global definitions (if any)
#-------------------------------------------------------------


if [ -f /etc/bashrc ]; then
        . /etc/bashrc   # --> Read /etc/bashrc, if present.
fi

if [ -f /etc/bash_completion ]; then
	. /etc/bash_completion
fi


#-------------------------------------------------------------
# Some settings
#-------------------------------------------------------------

ulimit -S -c 0          # Don't want any coredumps.
set -o notify
set -o noclobber
set -o ignoreeof
#set -o nounset
#set -o xtrace          # Useful for debuging.

# Enable options:
shopt -s cdspell
shopt -s cdable_vars
shopt -s checkhash
shopt -s checkwinsize
shopt -s sourcepath
shopt -s no_empty_cmd_completion
shopt -s cmdhist
shopt -s histappend histreedit histverify
shopt -s extglob        # Necessary for programmable completion.

# Disable options:
shopt -u mailwarn
unset MAILCHECK         # Don't want my shell to warn me of incoming mail.




#-------------------------------------------------------------
# Greeting, motd etc...
#-------------------------------------------------------------

# Define some colors first:
red='\e[0;31m'
RED='\e[1;31m'
blue='\e[0;34m'
BLUE='\e[1;34m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
NC='\e[0m'              # No Color
# --> Nice. Has the same effect as using "ansi.sys" in DOS.


# Looks best on a terminal with black background.....
#echo -e "${CYAN}This is BASH ${RED}${BASH_VERSION%.*}\
#${CYAN} - DISPLAY on ${RED}$DISPLAY${NC}\n"
#
#echo -e  "This is BASH ${BASH_VERSION%.*} - DISPLAY on DISPLAY"
#date


#-------------------------------------------------------------
# Shell Prompt
#-------------------------------------------------------------





#===============================================================
#
# ALIASES AND FUNCTIONS
#
# Arguably, some functions defined here are quite big.
# If you want to make this file smaller, these functions can
# be converted into scripts and removed from here.
#
# Many functions were taken (almost) straight from the bash-2.04
# examples.
#
#===============================================================

#-------------------
# Personnal Aliases
#-------------------

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# -> Prevents accidentally clobbering files.
alias mkdir='mkdir -p'

alias du='du -kh'       # Makes a more readable output.
alias df='df -kTh'
alias iostat='iostat -dxm'

#-------------------------------------------------------------
# The 'ls' family (this assumes you use a recent GNU ls)
#-------------------------------------------------------------
alias ll="ls -l --group-directories-first"
alias ls='ls -hF --color'  # add colors for filetype recognition
alias la='ls -Al'          # show hidden files
alias lx='ls -lXB'         # sort by extension
alias lk='ls -lSr'         # sort by size, biggest last
alias lc='ls -ltcr'        # sort by and show change time, most recent last
alias lu='ls -ltur'        # sort by and show access time, most recent last
alias lt='ls -ltr'         # sort by date, most recent last
alias lm='ls -al |more'    # pipe through 'more'
alias lr='ls -lR'          # recursive ls
alias tree='tree -Csu'     # nice alternative to 'recursive ls'

# If your version of 'ls' doesn't support --group-directories-first try this:
# function ll(){ ls -l "$@"| egrep "^d" ; ls -lXB "$@" 2>&-| \
#                egrep -v "^d|total "; }


LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/local/genetics/lib:/data/mus/lg/lib                             
export LD_LIBRARY_PATH
#export PATH=$PATH:/home/lg/bin                                                                                                                        
export PYTHONPATH=/data/lib/python2.7
export PYTHONPATH=$PYTHONPATH:/data/martha/PythonPackages
export PYTHONPATH=$PYTHONPATH:/Net/mus/data/martha/PythonPackages
alias python=python2.7                                                                                                    
export R_LIBS_USER=/data/lib/R
export PATH=$PATH:/usr/local/genetics/bin:/home/lg/bin
export PATH=$PATH:/data/scratch/martha/circos/current/bin


PERL_MB_OPT="--install_base \"/home/martha/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/martha/perl5"; export PERL_MM_OPT;
PERL5LIB="/home/martha/perl5/lib/perl5"; export PERL5LIB;
