Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
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
To: cygwin@cygwin.com
From: Shankar Unni <shankarunni@netscape.net>
Subject: Re: environment variable name converted to upper case
Date: Tue, 24 Aug 2004 18:57:11 -0700
Lines: 38
Message-ID: <cggrm3$vdv$1@sea.gmane.org>
References: <F76C9B2DA2FC4C4CA0A18E288BBCBCF708217C86@nihexchange24.nih.gov> <20040822144651.GA3391@coe.casa.cgf.cx> <cgdmn0$3sh$2@sea.gmane.org> <6.1.0.6.0.20040823215200.03423e28@pop.prospeed.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: adsl-68-120-146-125.dsl.snfc21.pacbell.net
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Thunderbird/0.7.3 Mnenhy/0.6.0.101
In-Reply-To: <6.1.0.6.0.20040823215200.03423e28@pop.prospeed.net>
X-IsSubscribed: yes

Larry Hall wrote:

> I'm not sure what you mean by 'Posix shells'.  Shells that come with the
> Cygwin environment don't expect uppercase.  Windows (and DOS) do, really.

OK, I was a little imprecise.

What I was trying to say was that NT *shells* preserves case in 
environment variables, but is case-insensitive in lookup. Which is why 
it allows variables like "Path" or "PATH" interchangeably. You can set 
"foo", but look up "%FoO%" or "%fOo", and it'll find that "foo" and 
return it. But just "set" prints out "foo=...", not "FOO=...".

"Posix shells" (OK, another bad term - I mean shells originally written 
to run on Unix-y or Posix-y systems - i.e. sh, bash, ksh, csh, etc., but 
not CMD, COMMAND.COM, 4NT, or others), on the other hand, are completely 
case-preserving and case-sensitive.

And in order to be able to see PATH in the environment in cygwin shells 
when the system had set Path, cygwin uppercases all environment vars 
when starting a cygwin process. What I was saying was, how about 
uppercasing just "Path/PATH"? We can leave the case of the others alone, 
as they are in the system environment.

OK, sure, there's minor complexity in saying

   if (stricmp(var, "path") == 0)
     uppercase(var)

instead of just

   uppercase(var)

but it reduces the needless element of surprise at the unnecessary 
munging of the environment.

Anyway, not a big point; just a suggestion, and it looks like it's been 
shot down. That's ok..


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

