On Tue, Dec 11, 2007 at 05:40:17PM -0800, Angus Leeming wrote: > Enrico Forestieri wrote: > >> configure_command_ = os::python() + ' ' + > >> quoteName(configure_script.toFilesystemEncoding()) + > >> with_version_suffix(); > > > > You are right. A parser would be needed, and it is going to become > > cumbersome and error prone. > > It just so happens that I wrote one using Boost.Spirit a couple of years > ago. Never got round to integrating it into LyX unfortunately. It's a > formally correct parser of a subset of sh. Certainly capable of handling > our command definition strings. > > See > http://www.lyx.org/~leeming/libs/child/doc/html/parse_pseudo_command_line.html > > The code's been languishing in the > boost/child > libs/child > subdirectories of http://www.lyx.org/~leeming > > Feel free to grab it. If you're interested I can certainly walk you through > it all.
I had already spotted that after discovering an old discussion of yours about spawning programs on some mingw list, where you were also proposed some library for doing correct quoting ;-) However, I'd rather revert the changes because they don't solve any problem (or those problems can be solved in other non-disruptive ways), destabilize an already working code base, put a burden that is best avoided, and I don't like that lyx forks just for launching a stupid script. -- Enrico