X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0	tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
X-ASG-Debug-ID: 1283372322-589e73f80001-w5GHUG
X-Barracuda-Envelope-From: daniel@fgm.com
X-Barracuda-Apparent-Source-IP: 216.2.55.102
X-ASG-Whitelist: Client
Message-ID: <4C7EB521.7000806@fgm.com>
Date: Wed, 1 Sep 2010 16:18:41 -0400
From: Daniel Barclay <daniel@fgm.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6
MIME-Version: 1.0
To: <cygwin@cygwin.com>
Subject: bash igncr and BASH_ENV (was: bash igncr documentation - where?)
References: <4C7E9782.40503@fgm.com> <4C7E9928.6000203@redhat.com> <4C7EA27B.80206@fgm.com>
X-ASG-Orig-Subj: bash igncr and BASH_ENV (was: bash igncr documentation - where?)
In-Reply-To: <4C7EA27B.80206@fgm.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Barracuda-Connect: UNKNOWN[216.2.55.102]
X-Barracuda-Start-Time: 1283372322
X-Barracuda-Encrypted: AES128-SHA
X-Barracuda-URL: http://spam.fgm.com:8000/cgi-mod/mark.cgi
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

 >> Yep - that email (most recently here[1]), along with
 >> /usr/share/doc/Cygwin/bash.README, are the definitive sources of all
 >> documentation to cygwin-specific patches to bash (of which igncr is one).
 >> [1] http://cygwin.com/ml/cygwin-announce/2010-08/msg00015.html

That read-me file says:

   4c. To affect all scripts, export the environment variable BASH_ENV,
   pointing to a file that sets the shell option as desired.  Bash will
   source this file on startup for every script.

Where that says "every script," does it meant only scripts starting with
"#!/bin/bash" and not scripts starting with "#!/bin/sh"?


(I notice that the BASH_ENV setup does not seem to work for a script that
starts with "#!/bin/sh", even when I also set ENV to the same filename.

That behavior seems to be consistent with bash's documentation (the
manual page) that when it is run as "sh", bash reads a different set of
startup files and environment variables, and for a non-interactive shell
(in "sh" mode) it doesn't read anything (specifically, not $ENV).)


Assuming that the answer to the above question is "yes":  Does that mean
that I probably need to use your SHELLOPTS method (from the paragraph
starting "4d")?

Thanks,
Daniel



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

