Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <5.1.0.14.2.20011002102745.00a6df08@pop.atg.com> X-Sender: matt AT pop DOT atg DOT com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 02 Oct 2001 10:33:36 -0400 To: David Starks-Browning From: Matt Landau Subject: Re: bash 2.04 can't complete ~/name if $HOME set to c:/users/foo? Cc: cygwin AT cygwin DOT com In-Reply-To: <4677-Tue02Oct2001103702+0100-starksb@ebi.ac.uk> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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. > >If you must invoke your emacs command from the Cygwin bash shell, you >could put the emacs command in a windows .bat file, and invoke that >file from Cygwin bash. In the .bat file, your HOME variable should be >set the way Emacs needs it. > >Hope this helps. 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. Saying "don't run non-Cygwin programs from bash" isn't a thrilling answer; an interactive shell is most useful when you can use it as your shell for *everything*. There is a half-hearted workaround, which is to reset HOME to a win32-style path in .bashrc so that ~/.bashrc expands to c:/users/matt/.bashrc (since cygwin programs understand win32-style paths, there's little reason not to do this), but it breaks bash's completion. That's the real bug I was asking about. It's not clear to me why bash should be able to expand posix-style paths but not win32-style paths. I suppose another workaround is to define a shell function that turns "emacs filename" into "emacs `cygpath -w filename`", converting all names back to win32-style paths before emacs ever sees them, but having to do this for every non-cygwin application I ever run from the shell is going to get tedious. -- 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/