delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/10/02/15:15:14

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Tue, 2 Oct 2001 15:12:29 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: bash 2.04 can't complete ~/name if $HOME set to c:/users/foo?
Message-ID: <20011002151229.A1904@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20011001192343 DOT 00a74568 AT pop DOT atg DOT com> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20011001192343 DOT 00a74568 AT pop DOT atg DOT com> <5 DOT 1 DOT 0 DOT 14 DOT 2 DOT 20011002102745 DOT 00a6df08 AT pop DOT atg DOT com> <20011002134419 DOT E12071 AT redhat DOT com> <200110021901 DOT VAA28178 AT linux.>
Mime-Version: 1.0
In-Reply-To: <200110021901.VAA28178@linux.>
User-Agent: Mutt/1.3.21i

On Tue, Oct 02, 2001 at 09:01:32PM +0200, Ehud Karni wrote:
>On Tue, 2 Oct 2001 13:44:19 -0400, Christopher Faylor <cgf AT redhat DOT com> wrote:
>> 
>> On Tue, Oct 02, 2001 at 10:33:36AM -0400, Matt Landau wrote:
>> >At 05:37 AM 10/2/2001, David Starks-Browning wrote:
>> >>If your non-Cygwin application (like Emacs) requires HOME be set in a
>> >>non-Cygwin way, then don't start emacs from your Cygwin bash shell.
>> >
>> >Let me clarify the problem.
>> >
>> >Emacs doesn't care what $HOME is set to, it cares what path it sees on
>> >the command line.  The issue is that bash, by default, expands
>> >~/filename to a posix-style path, resulting in commands like "emacs
>> >/c/users/matt/.bashrc", which doesn't work for any non-Cygwin program.
>> >
>> 
>> It is unlikely that anyone who is working on cygwin development, a large
>> part of which is devoted to providing unix path handling, is going to be
>> overly interested in modifying bash to handle MS-DOS paths.
>> 
>> So, as has been suggested elsewhere, the best solution is to inspect the
>> bash source code and provide a fix.  I can't speak for anyone else but I
>> know that I, personally, have no interest in making bash work with
>> MS-DOS paths.
>
>Cygwin has a small program cygpath.exe for this purpose. I wrote a little
>bash script that I think work around the problem. I call it run-win.sh and
>you run the M$Windows command thru it.  e.g. run-win.sh emacs ~/.bashrc

You left out the part of my email which actually mentions how to solve this
problem.  There should be no need for cygpath in this case.

Just set the HOME environment variable to a UNIX path.  It should work fine
with native windows apps since HOME will be translated back to MS-DOS format
prior to executing the program.  That's how cygwin works.

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