delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/08/04/19:24:29

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 <corinna-cygwin AT cygwin DOT com>
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: <AANLkTi=W1mfktf7Nri6B=fYPHTxwSqa-6O3tDuQL6KnU AT mail DOT gmail DOT com> <2BF01EB27B56CC478AD6E5A0A28931F20130250E AT A1DAL1SWPES19MB DOT ams DOT acs-inc DOT net>
MIME-Version: 1.0
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
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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:
> <snip/>
> > 
> > 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 <underscore> ( '_' ) 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019