Version française
Home     About     Download     Resources     Contact us    
Browse thread
Sys.command and quotes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sylvain Le Gall <sylvain@l...>
Subject: Re: Sys.command and quotes
Hello,

On 05-05-2009, Matthieu Dubuget <matthieu.dubuget@gmail.com> wrote:
> Hello,
>
> I have a problem with mingw version of ocaml (compiled by hand, or with 
> godi).
>
> 1- Is the following reproducible?
>
> 2- If yes, do you consider this as a bug?
>
> It seems that in "Sys.command s", if the first and the last characters 
> of s are '"', they are elided?
>

In fact, I have done some testing about this sometimes ago and comme to
the conclusion that "-handling on windows is quite weird. If and only if
there is a space (or other problematic char) in your commannd/arg name
you can use quoting. Otherwise it will be reported as an error.

I think it is not directly related to OCaml.

Maybe, I am not totaly right with my conclusion, but I can give you a
simple tips: 

Use Unix.create_process et al that take array as arguments. It always
use the good quoting.

Regards
Sylvain Le Gall