Web lists-archives.com

Re: [Mingw-msys] Recursive Directory Workaround

On Sunday 30 March 2008 17:15, James Kanze wrote:
> I downloaded the latest MSys a week or so ago; it didn't have
> bash, at least as such, so I also downloaded the version of bash
> from MinWG, and installed it in /usr/local/bin.

You should have sh.exe in /bin -- this is actually bash, but may be a v2 
release.  If you then downloaded the v3 update, which is recommended, 
then you should also install it in /bin.

> This is the shell I'm using.
> The problem I'm having is that bash is apparently expanding
> command line arguments that start with a /, i.e. if I invoke:
>    cl /help

This is by design; MSYS accepts UNIX paths, with the root representing 
the MSYS installation directory, (nominally c:/msys/1.0, as you have 
installed it), and it translates these to their native equivalents, so

> , the Microsoft compiler complains that it cannot find file
> c:/msys/1.0/help, 

This is exactly as you've asked it to do; compile a file called /help.

> rather than outputting its help.

You use UNIX syntax, in the MSYS shell, so to get the help, you use

  cl -help

> I wrote a  
> simple program, compiled it with cl, and found that this is what
> it actually sees as the first argument (or any command line
> argument).  This makes the shell close to unusable,

It is very usable, if you use it correctly.

> since / is the standard character for an option under Windows.  (cl
> will also accept -, but this is not true for all programs.)

If you do need to run a program which insists on `/', rather than accept 
`-' as the switchar, then you must double the `/'

  cl //help

This is documented, in the readme.rtf file which accompanies 
MSYS-1.0.10; if you have started out with the MSYS-1.0.11 preview, I'm 
not sure if you get this in the core package, but this question has 
been asked before.


Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
Mingw-msys mailing list