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

path should be in noexport, and a .esrc tip



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.


Some people who use es as a login shell, have been bitten by the fact
that es quits if an error is encountered while reading .esrc.  This
probably should be changed in initial.es, but in the meanwhile, I
moved my .esrc to .esRC and created a new one-line .esrc as follows:

catch @ e {echo $e >[1=2]} {. .esRC}


- Harald