|
From: Jim M. <jmi...@ya...> - 2014-06-24 22:49:32
|
windows uses ^ for most chars escape not \ but there is no escape for " and % for % this is a specification problem. complain to microsoft about it. >________________________________ > From: Yuri Kanivetsky <yur...@gm...> >To: min...@li... >Sent: Tuesday, June 24, 2014 3:11 PM >Subject: Re: [Mingw-users] running programs from MSYS with quotes > > > >If I understand you correctly, using single quotes is no better than using double quotes here. Both commands: > > >$ cmd //c '"cmd" /c echo test' > >$ cmd //c "\"cmd\" /c echo test" > > > >produce the same command line: > > >c:\Windows\system32\cmd.exe /c "\"cmd\" /c echo test" > > > >And they doesn't do what they are supposed to do. The point here is to pass the following command line to the process: > > >c:\Windows\system32\cmd.exe /c ""cmd" /c echo test" > > >AFAIR, some programs, amongst which are cmd, start, hstart, treat their command line specially. When given things like `""cmd" /c echo test"`, they just ignore the outer quotes or treat the whole thing as one big quoted argument. So, is there a way to make it so that GetCommandLine() would return exactly this: e:\showargv.exe ""c:\Program Files\foo" /k echo foo" ? > > >> MSYS sh DTRT here,automatically inserting double quotes where needed, to keep arguments with embedded white space, or embedded special characters, intact. > > >To be honest, it looks like MSYS sh has too much magic in it. Generally, I prefer straightforward behavior and don't like when programs make up my mind for me. Because it usually makes things more complex than they should be. But I don't know the reasoning, so I might be evidently wrong here. > > >Regards, >Yuri >------------------------------------------------------------------------------ >Open source business process management suite built on Java and Eclipse >Turn processes into business applications with Bonita BPM Community Edition >Quickly connect people, data, and systems into organized workflows >Winner of BOSSIE, CODIE, OW2 and Gartner awards >http://p.sf.net/sfu/Bonitasoft >_______________________________________________ >MinGW-users mailing list >Min...@li... > >This list observes the Etiquette found at >http://www.mingw.org/Mailing_Lists. >We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated. > >_______________________________________________ >You may change your MinGW Account Options or unsubscribe at: >https://lists.sourceforge.net/lists/listinfo/mingw-users >Also: mailto:min...@li...?subject=unsubscribe > > |