# If not interactive, do nothing.
[ -z "$PS1" ] && return

HISTCONTROL=ignoreboth
shopt -s histappend
HISTSIZE="unlimited"
HISTFILESIZE="unlimited"
HISTCONTROL=ignorespace

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

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

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

BLACK='\e[0;30m'
BLUE='\e[0;34m'
GREEN='\e[0;32m'
CYAN='\e[0;36m'
RED='\e[0;31m'
PURPLE='\e[0;35m'
BROWN='\e[0;33m'
LIGHTGRAY='\e[0;37m'
DARKGRAY='\e[1;30m'
LIGHTBLUE='\e[1;34m'
LIGHTGREEN='\e[1;32m'
LIGHTCYAN='\e[1;36m'
LIGHTRED='\e[1;31m'
LIGHTPURPLE='\e[1;35m'
YELLOW='\e[1;33m'
WHITE='\e[1;37m'
NC='\e[0m' # No Color

# Sets default editor.
export EDITOR=vim

# adding some other program paths to PATH
export PATH=${PATH}:/sbin:/usr/sbin:usr/local/bin
# adding a user's private path if it exists
[ -d ~/bin/ ] && export PATH=${PATH}:${HOME}/bin

[ -f  /etc/bash_completion ] && . /etc/bash_completion

export BASH_ALIASES="$HOME/.bash_aliases"
export BASH_FUNCTIONS="$HOME/.bash_functions"
export BASH_PROMPT="$HOME/.bash_prompt"
export BASH_GREETING="$HOME/.bash_greeting"
export BASH_VARIABLES="$HOME/.bash_variables"

[ -f "$BASH_ALIASES" ] && . "$BASH_ALIASES"
[ -f "$BASH_FUNCTIONS" ] && . "$BASH_FUNCTIONS"
[ -f "$BASH_PROMPT" ] && . "$BASH_PROMPT"
[ -f "$BASH_GREETING" ] && . "$BASH_GREETING"
[ -f "$BASH_VARIABLES" ] && . "$BASH_VARIABLES"
