# /etc/bash_dircolors: called from /etc/bash.bashrc
# Set ls to use colours if available, and set default ls options

export LS_OPTIONS=' --group-directories-first --time-style=long-iso'

if [ -x /usr/bin/dircolors ]; then
    test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
    if [ ! -f ~/.deny_color_ls ]; then
        LS_COLOR_OPT=' --color=auto'
        #
        alias grep='grep --color=auto'
        alias fgrep='fgrep --color=auto'
        alias egrep='egrep --color=auto'
    else
        LS_COLOR_OPT=' --color=never'
    fi
else
    LS_COLOR_OPT=' --color=never'
fi

export LS_COLOR_OPT

alias ls="ls $LS_COLOR_OPT$LS_OPTIONS"

