X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org From: "Jon Beniston" To: References: In-Reply-To: Subject: RE: bash pwd returning windows style paths Date: Fri, 21 May 2010 00:24:24 +0100 Message-ID: <005301caf873$95bbc9c0$c1335d40$@beniston.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 > POSIX states that a shell is under no obligation to trust a PWD > inherited from the parent process, and that there are unspecified > results if you try to manually change PWD outside of the use of 'cd' > within the shell. Bash, in particular, merely checks whether the > current value of the inherited PWD happens to match the current > directory, and not whether it is a canonical spelling. >> 1. Change Eclipse so it sets PWD to a Cygwin style path. > > That, or not set it at all in the first place. Looking through some of the Eclipse code this looks tricky. I think Eclipse (the CDT plugin actually) sets it up as a default environment variable so that any tool it runs can use it (which includes programs not run via bash and other non-cygwin based tools). If it were removed, I presume other tools could break that depend on it. Similarly I guess Windows or Ming based tools would fail if it was a Cygwin path. > You can use 'cd -P .' to force bash to set PWD to the canonical name of > the current directory, which will then get rid of the windows-style naming: Thanks - I tried adding this to the newlib configure script and it now works. >> 2. Patch the bash pwd builtin so it doesn't return Windows paths. > > I don't want to go changing bash just for this. Fair enough, I guess this probably isn't the right place anyway, as it wouldn't help other Cygwin programs not run via bash. I notice that Cygwin does convert the path style for some environment variables, such as PATH, HOME and TMP. Would it make any sense to add PWD to that list? Cheers, Jon -- 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