Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com From: Shankar Unni Subject: Re: environment variable name converted to upper case Date: Tue, 24 Aug 2004 18:57:11 -0700 Lines: 38 Message-ID: References: <20040822144651 DOT GA3391 AT coe DOT casa DOT cgf DOT cx> <6 DOT 1 DOT 0 DOT 6 DOT 0 DOT 20040823215200 DOT 03423e28 AT pop DOT prospeed DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT sea DOT gmane DOT 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/