Re: Color-ls package nearly ready for release, but I need... (fwd)
- To: debian-user@Pixar.com
- Subject: Re: Color-ls package nearly ready for release, but I need... (fwd)
- From: Shawn Asmussen <shawn@nfinity.com>
- Date: Fri, 15 Mar 1996 05:59:47 -0600 (CST)
- Message-id: <Pine.BSD/.3.91.960315055934.9051C-100000@nfinity.com>
---------- Forwarded message ----------
Date: Fri, 15 Mar 1996 05:57:08 -0600 (CST)
From: Shawn Asmussen <shawn@nfinity.com>
Subject: Re: Color-ls package nearly ready for release, but I need...
On Fri, 15 Mar 1996, Richard Kettlewell wrote:
> >I believe that color ls comes with a program called dircolors or something
> >like that. Then you typically run eval `dircolors` in your .profile and
> >vdir gets aliased to ls -li.
>
> Can this be made to work for all possible shells? What if you run one
> of these programs from a cron job or in a shell script and .profile
> hasn't been run?
Well, as long as the variables set by dircolors are exported, ls should
behave correctly in shell scripts, and I believe eval works the same
under csh and other shells, so it can be set regardless of what shell the
user is using. eval `dircolors` is the standard way to set those things
according to the man page for color ls. As far as a cron job goes, I
suppose you would just need to make sure that the proper values are set
within the cron job, either with an eval `dircolors` in the right places,
or by specifying the correct options manually, and not relying on the
eval to do it for you.
> >The only way is to make the executable perform differently based on
> >the way it is called, like the way sz sb and sx are all hardlinks to
> >the same executable, or to make vdir a shell script. I prefer the way
> >it's currently handled with the aliases.
>
> I'm generally against putting anything extra in profiles as mine takes
> too long to run already l-)
Well, one eval isn't going to pump up .profile execution too much, and as
that's the way it is designed to work, I think that going that way would
be the best way to go.
Shawn
Reply to: