Some terminals such as M-x shell in Emacs don't understand color
output, and set the TERM environment variable to "dumb". ls should
check that variable when turning on color from --color=auto.

For a use case of TERM=dumb which works around ls --color=auto, here's
a snippet from /etc/skel/.bashrc in a Debian or Ubuntu system.

# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
   eval "`dircolors -b`"
   alias ls='ls --color=auto'
   #alias dir='ls --color=auto --format=vertical'
   #alias vdir='ls --color=auto --format=long'
fi

If this bug is considered in scope for ls, I can probably code up a
patch pretty soon.

-Lenny


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to