-# ls with coloring
+# enable color support of ls and also add handy aliases
lsflags="-hF"
-# Detect which `ls` flavor is in use
-if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls`
- colorflag="--color=auto"
- lsflags="$lsflags -I NTUSER.\* -I ntuser.\*"
-else # OS X `ls`
- export CLICOLOR=1
- colorflag="-G"
+if [ -x "$(which dircolors 2>/dev/null)" ]; then
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+ lsflags="$lsflags -I NTUSER.\* -I ntuser.\*"
+ colorflag="--color=auto"
+ alias grep='grep --color=auto'
+ alias egrep='egrep --color=auto'
+ alias fgrep='fgrep --color=auto'
+else # OSX version of ls
+ export CLICOLOR=1
+ colorflag="-G"
fi
alias ls="ls $colorflag $lsflags"
-alias sl=ls
-alias l='ls -CF'
-alias la='ls -A'
alias ll='ls -l'
+alias la='ls -A'
+alias l='ls -CF'
alias l1='ls -1'
alias l.='ls -d .[a-z]*'
-# grep and less with coloring
-alias grep='grep --color=auto'
-alias egrep='egrep --color=auto'
-alias fgrep='fgrep --color=auto'
alias less='less -m -N -g -i -J --underline-special --SILENT -X'
alias more='less'
set -o vi
+# Set unlimited history
+HISTFILESIZE=
+HISTSIZE=
+HISTCONTROL=ignoreboth:erasedups
+HISTTIMEFORMAT="[%F %T] "
+HISTFILE=~/.bash_history.local
+
# Use 'help shopt' to see the documentation for the given options
shopt -s autocd
shopt -s cdspell
+shopt -s checkwinsize
shopt -s cmdhist
shopt -s dotglob
shopt -s globstar
GIT_PS1_SHOWUPSTREAM='auto'
GIT_PS1_HIDE_IF_PWD_IGNORED=1
-# Set unlimited history
-HISTFILESIZE=
-HISTSIZE=
-HISTCONTROL=ignoreboth:erasedups
-HISTTIMEFORMAT="[%F %T] "
-HISTFILE=~/.bash_history.local
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
-
# Load completion, aliases, and local settings
-[ -f ~/.bash_completion ] && . ~/.bash_completion;
[ -f ~/.bash_aliases ] && . ~/.bash_aliases;
+[ -f ~/.bash_completion ] && . ~/.bash_completion;
[ -f ~/.bashrc.local ] && . ~/.bashrc.local
# .profile is for things not specifically related to Bash, like environment variables PATH and others, and should be available anytime.
-# set PATH so it includes user's private bin
-export PATH=~/bin:$PATH
+# call shell specific settings
+if [ ! "x${BASH_VERSION}" = "x" ]; then
+ [ -f ~/.bashrc ] && . ~/.bashrc
+fi
+
+# set PATH so it includes local bin's
+export PATH=~/.local/bin:~/bin:$PATH
export TMP=~/.cache
export TEMP=$TMP
# colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
-# call shell specific settings
-if [ ! "x${BASH_VERSION}" = "x" ]; then
- [ -f ~/.bashrc ] && . ~/.bashrc
-fi