# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
   return
fi

export _ETC_BASHRC=1

export GNU_COREUTILS_INSTALLED=true

PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize

#
# Colored file listings
#
if test -x /usr/bin/dircolors ; then
    #
    # set up the color-ls environment variables:
    #
    if test -f $HOME/.dir_colors ; then
        eval "`dircolors -b $HOME/.dir_colors`"
    elif test -f /etc/DIR_COLORS ; then
        eval "`dircolors -b /etc/DIR_COLORS`"
    fi
fi

if [ "$GNU_COREUTILS_INSTALLED" = "true" ]; then
if test "${LS_COLORS+empty}" = "${LS_COLORS:+empty}" ; then
    LS_OPTIONS=--color=tty
else
    LS_OPTIONS=--color=none
fi
if test "$UID" = 0 ; then
    LS_OPTIONS="-a -N $LS_OPTIONS -T 0"
else
    LS_OPTIONS="-N $LS_OPTIONS -T 0"
fi
fi

if test "$EMACS" = "t" ; then
    LS_OPTIONS='-N --color=none -T 0';
    tset -I -Q
    stty cooked pass8 dec nl -echo
fi

. /etc/bash_prompt

# Path
test -d /usr/local/bin && export PATH=/usr/local/bin:$PATH
test -d /usr/games && export PATH=/usr/games:$PATH
test -d /opt/local/bin && export PATH=/opt/local/bin:$PATH
test -d /usr/local/lib/erlang/bin && export PATH=/usr/local/lib/erlang/bin:$PATH
test -d /usr/local/man && export MANPATH=/usr/local/man:$MANPATH

alias ls='/bin/ls $LS_OPTIONS'
alias ll='ls -l'
alias la='ls -la'

if [ -z "$_DOTBASHRC" ]; then
    [ -f ~/.bashrc ] && . ~/.bashrc
fi

