[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: profile.d [was Re: UMASK 002 or 022?]



On Fri, Jun 09, 2000 at 08:08:07PM +0200, Francesco Tapparo wrote:
> 
> Yes, I realize that a configuration file for ls sounds strange.I was only
> trying to find a clean solution to the problem of setting the colors for ls
> indipendently from the shell.
> Right now the method is to do an 
> 
> `dircolors`
> alias ls='ls --color=auto'

#! /bin/sh
eval `dircolors`
exec /bin/ls $*

put that in ~/bin/ls and set your PATH appropriatly (i would chmod -R
a-w ~/bin for safty reasons) and your alias problem is solved.  

> this has the proble that some shell do not support aliases (the mail I've
> replied to was searching a solution to this problem).

i would call such a shell broken and suspect there is a) not that many
people using such a shell, and b) those that are probably don't care
about aliases or colorized ls.  

> the standard way to customize the color is to put an appopirate configuation
> file in /etc/foo and then call 
> `dircolors /etc/foo`

dircolors is a different utility.

> before the alias.
> 
> So we are alreadsy using a configuration file for the customization (only it
> is not installled by default). So put the color options in a configuration
> file for ls is not so strange. And we would solve the problem of the
> dependency from the shell.

we already have a config file for colorization, but ls does not need
one for itself, especially since we only add one single argument to
the list, the config file would end up looking like this:

$ cat /etc/lsrc
color=yes
$

i don't know about you but i really don't care for itty bitty config
files like that.

the shell alias works fine for customising ls for probably 95% of
people, the others can use the shell script above. (which they
probably are doing anyway if they want any other aliases)

-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgpGGp6ezlN8U.pgp
Description: PGP signature


Reply to: