| delorie.com/archives/browse.cgi | search |
| 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 |
| Mail-Copies-To: | nobody |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Zsh filename completion sluggishness? |
| References: | <Pine DOT LNX DOT 4 DOT 21 DOT 0302132230380 DOT 9273-100000 AT gremlin DOT fruitbat DOT org> |
| <874r76ss4p DOT fsf AT squeaker DOT lickey DOT com> | |
| <20030214180959 DOT GA19962 AT redhat DOT com> | |
| From: | Matt Armstrong <matt AT lickey DOT com> |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Date: | Fri, 14 Feb 2003 11:38:06 -0700 |
| In-Reply-To: | <20030214180959.GA19962@redhat.com> (Christopher Faylor's |
| message of "Fri, 14 Feb 2003 13:09:59 -0500") | |
| Message-ID: | <87y94ir9m9.fsf@squeaker.lickey.com> |
| User-Agent: | Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2 |
| MIME-Version: | 1.0 |
| X-Virus-Scanned: | by AMaViS snapshot-20020300 |
Christopher Faylor <cgf-cygwin AT cygwin DOT com> writes:
> On Fri, Feb 14, 2003 at 10:12:54AM -0700, Matt Armstrong wrote:
>>In the Win32 world, quotes around path elements are valid. If I have:
>>
>> PATH="c:\foo bar"
>>
>>cmd.exe will find executables in that dir.
>>
>>When I run bash or zsh, things in "c:\foo bar" aren't found.
>
> This is a UNIX emulation environment. "c:\foo bar" doesn't mean the c drive
> in a PATH variable. It means the 'c' directory followed by the '\foo bar'
> directory. Colon is the separator for PATH.
>
> The correct syntax for the above is PATH="/cygdrive/c/foo bar" .
I understand completely -- as I said somewhat ambiguously I was
setting the path to "c:\foo bar" in cmd.exe, then running bash.
When Cygwin initializes its PATH from the Win32 one, it doesn't handle
quoted elements properly.
E.g. cygwin converts the Win32 path like this:
c:\foo;"c:\bar" -> /cygdrive/c/foo:"c:\bar"
But it should do this:
c:\foo;"c:\bar" -> /cygdrive/c/foo:/cygdrive/c/bar
The latter is the semantic equivalent to the Win32 path.
The session below describes exactly what I'm talking about.
Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.
C:\>cd foo bar
C:\foo bar>dir
Volume in drive C is MYDISK
Volume Serial Number is 7C67-4A84
Directory of C:\foo bar
02/14/2003 10:01a <DIR> .
02/14/2003 10:01a <DIR> ..
02/14/2003 10:01a 19 foobar.cmd
1 File(s) 19 bytes
2 Dir(s) 1,021,567,488 bytes free
C:\foo bar>cd ..
C:\>foobar
'foobar' is not recognized as an internal or external command,
operable program or batch file.
C:\>set PATH="c:\foo bar";%PATH%
C:\>foobar
C:\>echo I ran foobar!
I ran foobar!
C:\>cd cygwin
C:\cygwin>cygwin
maarmstr AT MAARMSTR ~
$ which foobar.cmd
foobar.cmd: Command not found.
maarmstr AT MAARMSTR ~
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:"c:/foo bar":/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/c/WINNT/System32/Wbem:/bin:/usr/bin:/usr/X11R6/bin
maarmstr AT MAARMSTR ~
$ export PATH='/cygdrive/c/foo bar':$PATH
maarmstr AT MAARMSTR ~
$ which foobar.cmd
/cygdrive/c/foo bar/foobar.cmd
maarmstr AT MAARMSTR ~
$
--
matt
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |