Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Mon, 19 Nov 2001 12:41:16 -0500
From: Chet Ramey <chet@nike.ins.cwru.edu>
To: brent.wilson@cacheflow.com
Subject: Re: SHELL environment variable is no longer set to /bin/bash
Cc: cygwin@cygwin.com, chet@po.cwru.edu
Reply-To: chet@po.cwru.edu
Message-ID: <011119174116.AA11337.SM@nike.ins.cwru.edu>
Read-Receipt-To: chet@po.CWRU.Edu
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-In-Reply-To:  Message from brent.wilson@cacheflow.com of Mon, 19 Nov 2001 01:51:33 -0800 (id <EB19A8A38B497D4FA6C88EADE3A8607F9276F6@cf-bay-exch-04.cacheflow.com>)

> 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    chet@po.CWRU.Edu    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/

