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