delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/26/19:23:33

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Sun, 26 Jan 2003 19:23:37 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Fw: cygwin 1.3.19 Windows 2000 Professional SP3 bash $home /usr/bin/%USERPROFILE%
Message-ID: <20030127002337.GB1908@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <004401c2c58e$064f1870$0b01a8c0 AT w2k30g> <4 DOT 3 DOT 1 DOT 2 DOT 20030126175550 DOT 024e8ba8 AT pop DOT rcn DOT com>
Mime-Version: 1.0
In-Reply-To: <4.3.1.2.20030126175550.024e8ba8@pop.rcn.com>
User-Agent: Mutt/1.5.1i

On Sun, Jan 26, 2003 at 06:30:23PM -0500, Larry Hall (RFK Partners, Inc) wrote:
>At 05:55 PM 1/26/2003, David Christensen wrote:
>>However, I still say there is a Bash/Cygwin bug -- if Bash/Cygwin reads
>>the Windows HOME environment variable and gets "%USERPROFILE%", it
>>should evaluate that to get "C:\Documents and Settings\dpchrist" and
>>set my home directory to "/cygdrive/c/Documents and Settings/dpchrist".
>>Starting in, and setting HOME to, "/usr/bin/%USERPROFILE%" is bad.
>
>Sorry, I can't reproduce this bug with Cygwin 1.3.17 or 1.3.19 (and
>latest bash).  If I set HOME="%USERPROFILE%" at my command (cmd)
>prompt, start bash with "bash --login -i", and "echo $HOME", I get
>exactly what I expect.  I see the name of the directory specified by
>"%USERPROFILE%".  If I "cd ~", I get there too.  Can you provide any
>insight as to how you get HOME set to "/usr/bin/%USERPROFILE%" in bash?
>This seems to be the root of the problem you saw but I can't reproduce
>it.

I think the assumption is that bash should be doing expansion of any
%DELIMITED% variables it sees in the environment.  It is possible to set
an environment variable to %SOMETHING% via the control panel, I think.
And, the %SOMETHING% will not be expanded as it would when you set HOME
above.  bash just reads the environment variables directly via a Win32
API.  It doesn't and shouldn't be doing any % expansion.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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