Subject: Re: SHELL environment variable is no longer set to /bin/bash
From: Chet Ramey <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Mon, 19 Nov 2001 12:41:16 -0500

> I have noticed in the latest Cygwin release that the SHELL environment
> variable is no longer set to /bin/bash. Actually, it isn't even set at all.
> Am I missing something?

Bash-2.05a no longer auto-exports SHELL if it sets it to a default value.
The same goes for HOME, PATH, TERM, and a few others.

First, bash does make sure that SHELL has a value in the current shell,
even if it was not inherited from the shell's parent in the environment.
That hasn't changed.

Second, Bash assumes that the shell's parent (or one of its ancestors)
will set SHELL to something useful.  On Unix, that's done by one of
the login programs.  Since nearly all instances of bash will have
SHELL in their initial environment, SHELL will be exported to the
shell's children, because bash adds the export attribute to variables
created from the initial environment.

Thus, most users will not see any difference in behavior.

The idea behind the change is that the shell should add as few things
as possible to the environment without being directed by the user.
Similar reasoning inspired the change in the shell's treatment of PATH,
HOME, and TERM, and so on.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    [email-masked]    http://cnswww.cns.cwru.edu/~chet/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/