#
# FreeBSD stuff
#

# GNU ls(1) from FreeBSD ports is called gnuls(1).
if -exe gnuls; then
    if [ "$TERM" != 'dumb' ]; then
        if -exe gdircolors; then
            if [ -r ~/.dircolors ]; then
                eval $(gdircolors -b ~/.dircolors)
            else
                eval $(gdircolors -b)
            fi
        fi
        alias ls='gnuls -h --color=auto'
        alias l='gnuls -lh --color=auto'
    else
        alias ls='gnuls -h'
        alias l='gnuls -lh'
    fi
else
    if [ "$TERM" != 'dumb' ]; then
        export LSCOLORS='exfxbxdxcxegedabagacad'
        alias ls='ls -GFh'
    alias l='ls -lGFh'
    else
        alias ls='ls -Fh'
        alias l='ls -lFh'
    fi
fi

# GNU tar is called gtar
if -exe gtar; then
    alias tar='gtar'
fi

# GNU find is called gfind
if -exe gfind; then
    alias find='gfind'
fi

