# color-ls initialization
 
COLORS=/etc/DIR_COLORS

[ -e "/etc/DIR_COLORS.$TERM" ] && COLORS="/etc/DIR_COLORS.$TERM"



[ -e "$HOME/.dircolors" ] && COLORS="$HOME/.dircolors"
[ -e "$HOME/.dircolors.$TERM" ] && COLORS="$HOME/.dircolors.$TERM"



[ -e "$HOME/.dir_colors" ] && COLORS="$HOME/.dir_colors"
[ -e "$HOME/.dir_colors.$TERM" ] && COLORS="$HOME/.dir_colors.$TERM"



[ -e "$COLORS" ] || return

eval `dircolors --sh "$COLORS"`
[ -z "$LS_COLORS" ] && return


if ! egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null ; then
        alias ll='ls -l --color=tty' 2>/dev/null
        alias l.='ls -d .* --color=tty' 2>/dev/null
        alias ls='ls --color=tty' 2>/dev/null
else
        alias ll='ls -l' 2>/dev/null
        alias l.='ls -d .*' 2>/dev/null
fi
Topic revision: r2 - 2006-09-19 - AnssiYliJyra
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback