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

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



On Thu, Jun 08, 2000 at 10:21:21AM +0100, Andrew Stribblehill wrote:
> Quoting Sami Haahtinen <ressu@uusikaupunki.fi>:
> <snip>
> > 
> > although this brought up problems while i was writing this..
> > as other shells don't support aliases, it would have to be marked in
> > the config with something like..
> > 
> > alias('ls', 'ls --color=auto -F')
> 
> With the exception of the quote signs, this is just what I do. I
> put this in my .environment file (yes, made that up, guys!) Then
> all I needed to do was add in .bash_profile.m4 the following magic:
> 
> define(`set', `export $1=$2')
> define(`alias', ``alias' $1=$2')
> include(`.environment')
> 
> I set something similar for .cshrc.m4. Hence any useful
> environment variables are propogated to both shells when I run
> make.

Uhm. I think that the more clean solution would be to modify ls to read a
config file /etc/lsrc. I know that this can sound strange, but the config
file would solve all these shell compatibility problem in a clean way.
Of course if an option is given in the command line, or if the appropriate
environment value is set, they would have the precedence.
The color options (what color for what file) from ls would be another thing to
put in that /etc/lsrc.

> 
> One problem I /can/ see with this is that m4 would need its
> priority elevating if it were to be used in this way. But hey,
> *everyone* uses m4, don't they?
> 
> Cheerio,
> 
> Andrew Stribblehill
> Systems Programmer, IT Service, University of Durham, England

cheers

-- 
Francesco Tapparo				 |	cesco@debian.org
fight for your software freedoms: www.fsf.org    |      tapparo@mat.unimi.it



Reply to: