[Cialug] LS ?
Jeffrey C. Ollie
jeff at ocjtech.us
Fri Apr 27 10:59:33 CDT 2007
On Fri, 2007-04-27 at 10:44 -0500, Josh More wrote:
> Another fun trick is to do
>
> eval `dircolors`
>
> That will shift the shades of the colours to match your background.
> Why RH doesn't do this by default has always baffled me. It's one of
> the changes I always make to /etc/bashrc as soon as I build a box.
Uhm, in fact they do:
==== /etc/profile.d/colorls.sh ====
# color-ls initialization
alias ll='ls -l' 2>/dev/null
alias l.='ls -d .*' 2>/dev/null
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
fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://cialug.org/pipermail/cialug/attachments/20070427/7beee963/attachment.pgp
More information about the Cialug
mailing list