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

Re: path should be in noexport, and a .esrc tip



On 18 Nov 1994, Harald Hanche-Olsen wrote:
> The `path' variable should not be exported to the environment (as
> opposed to PATH, which should).  I added the line
> 
> noexport = path $noexport
> 
> to my startup file.  Why?  First, it does not hurt.  If you start a
> new es, the set-PATH function will be run to set the path variable.
> Second, assume you do `su root', as I sometimes do.  When I am root, I
> still want the convenience of my favourite shell.  But upon su root,
> PATH is set to whatever is more appropriate for root, while the path
> variable is unchanged.  When I start es next, the set-path and
> set-PATH functions will both be run, and it so happens that the former
> is run last, overwriting root's PATH with mine.  One still has to be
> careful with personal functions, and one should probably also take
> care to run recache (for those who use the path cache code from
> esrc.haahr) too.

Harald is right on both of these points.

In the next release of es [been a while since I used that phrase, but I
intend to release a new version by the early part of next year], the
following will be changed:

(1) path will be added to the noexport list in initial.es

(2) cdpath has been removed from initial.es as already discussed on this
list, but in the example of cdpath included in esrc.haahr, cdpath will
be added to the noexport list

(3) set-path and set-PATH will be redefined in esrc.haahr to do a
recache for the reasons Harald points out

Paul