[Bryen]
Is there a way to disable color coding in the 'ls' command permanently?

Short of modifying and recompiling the code (from GNU coreutils), you might add something like this (untested) in your ~/.bashrc file:

 ls() { /bin/ls --color=none "$@"; }

and then, you should not get colors when working interactively.

In my own case, I not only like having colors, but activate a few other options as well, depending on a few various contexts and systems, as shown below -- you do not want it, but it might trigger other ideas :-).

 ls() {
   local options='--show-control --quoting-style=literal'
   if test -t 1; then
     options="$options -Nx"
   else
     options="$options -N"
   fi
   if [ "$TERM" != dumb ]; then
     options="$options --color=auto"
   fi
   if /bin/ls --help | /bin/grep -s -- --time-style >/dev/null; then
     options="$options --time-style='+%Y-%m-%d %H:%M'"
   fi
   eval /bin/ls $options "$@"
 }

--
François Pinard   http://pinard.progiciels-bpi.ca
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to