X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 4 Aug 2010 21:24:16 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: incompatible environment variable names Message-ID: <20100804192416.GA4610@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <2BF01EB27B56CC478AD6E5A0A28931F20130250E AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <2BF01EB27B56CC478AD6E5A0A28931F20130250E@A1DAL1SWPES19MB.ams.acs-inc.net> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Aug 4 13:59, Nellis, Kenneth wrote: > > From: Steven Collins > > On Wed, Aug 4, 2010 at 10:23, Nellis, Kenneth wrote: > > > [...] > > > So, Windows has no problem with + symbols in variable names, but > > > bash does, kinda sorta: > > > [...] > > > > From the bash man page: > > > > > Hench bash does not support the plus character in a variable name and > > no amount of finagling is going to fix it. > > Well, *somehow* it got into the Cygwin environment, and cygwin.bat directly > invokes bash, so I interpret this as bash creating the Cygwin environment. > Where is the hole in this logic? The environment is converted by the Cygwin DLL, not by bash. And, even though the '+' character is *theoretically* allowed in a POSIX environment variable name(*), neither bash nor tcsh(**) handles it transparently as part of a variable name. This is *not* a Cygwin problem(**). (*) http://www.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html Accentuation added by me: [...] Environment variable names used by the utilities in the Shell and Utilities volume of POSIX.1-2008 consist solely of uppercase letters, digits, and the ( '_' ) from the characters defined in [ASCII] and do not begin with a digit. Other characters *may* be permitted by an implementation; applications *shall* tolerate the presence of such names. (**) On Linux: tcsh$ $ echo $version tcsh 6.17.00 (Astron) 2009-07-10 (x86_64-unknown-linux) options wide,nls,dl,al,kan,rh,color,filec tcsh$ setenv QNX_VISUAL_C++_PATH foo tcsh$ env | grep QN QNX_VISUAL_C++_PATH=foo tcsh$ echo $QNX_VISUAL_C++_PATH QNX_VISUAL_C: Undefined variable. tcsh$ echo ${QNX_VISUAL_C++_PATH} Missing }. tcsh$ echo "$QNX_VISUAL_C++_PATH" QNX_VISUAL_C: Undefined variable. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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