Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Earnie Boyd <earnie-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f <at> public.gmane.org>
Subject: Re: Command line MinGW directory expansion...
Newsgroups: gmane.comp.gnu.mingw.user
Date: Friday 15th September 2006 12:24:02 UTC (over 11 years ago)
Quoting Keith MARSHALL
:

> Carl Godkin wrote:
>> I can live with the double-slash business if I have to, but I
>> still have not gotten an answer to my original question:  Is
>> there no way to prevent the MSYS shell from expanding a command
>> line argument like "/b" to "c:/msys/1.0/b" ?
>
> There isn't any direct mechanism, at present.  Earnie has hinted
> that he may provide something in an upcoming release, but that's
> not likely to be before 1.0.12, (and he is only now working up to
> a 1.0.11 release).
>
> However, with a bit of lateral thinking, it *may* be possible to
> work around it; the trick is to put something in front, which
> hides the initial pair of backslashes from the shell:--
>
>  $ cmd //c echo /d/foo
>  d:/foo
>
>  $ cmd //c echo //d/foo
>  //d/foo
>
>  $ cmd //c 'echo /d/foo'
>  /d/foo
>
> Do note that, traditionally, MS-DOS and MS-Windows commands have
> treated the slash as an option leader, rather than a file name
> separator in path names; all such programs are expected to handle
> *any* sequence of multiple contiguous slashes, transparently, as if
> there was only one(1).  Having said that, since a doubled initial
> slash is MSYS convention to pass an optional switch to a native
> program, the second example above does appear to indicate a bug
> in the path translation logic; it would be reasonable to expect
> the doubled slash to be reduced to a single slash, when building
> the argv to be passed to the native program.
>

Well actually the logic is that if more than one slash is followed by a 
single character before white space or eol then it will remove the 
beginning slash. So //d/foo is referring to a host d with a share foo 
and /d/foo refers to some directory that needs translated to it's 
native path.  Using ``cmd //c'' and quoting the entire command is the 
best option to eliminate the translation.

Earnie Boyd

http://shop.siebunlimited.com


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
MinGW-users mailing list
[email protected]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
 
CD: 3ms