[EMAIL PROTECTED] wrote:
I think somebody needs to audit bash to ask the following questions:
(1) If environment variable X is imported to a script, what
are the bad effects?
(2) What is the probability that a script writer will remember
to reset X? (Heck, how many scripts even reset IFS? And
that's been well known about sh for 20 years.)
(3) If X is disabled in non-interactive mode, what are the bad
results?
(4) Is it sufficient to null out X on startup, and then let
the script reset it if it chooses?
The man page and info doc should list all of the shell variables that
affect bash's behavior. If that's not the case, please report it.
As for IFS, the shell does reset it to " \t\n" at startup (which I
cribbed from the Korn shell). That's why bash scripts don't reset
it themselves.
If by (4) you mean that the shell should ignore variables from the
environment when it starts up in non-interactive mode, there will have
to be a very good case made to introduce this level of backwards
incompatibility. That case hasn't been made yet.
(And the CDPATH issue has come up before. Several times.)
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/