Abdelrazak Younes wrote: > The problems arrive when some options require one argument, others > require two arguments, etc. Then it is very difficult to know which is a > wrong option argument and which is a filename. At least LyX cannot make > the difference, I noticed that with this command line on windows:
No, that is very easy: Each option knows how many arguments it needs. > ./lyx -x 'command-sequence buffer-load UserGuide.lyx ; buffer-begin ; > repeat 100 screen-down ; lyx-quit' > > This command opens multiple new Buffers with the names 'buffer-load', > ';' etc. That is a different problem. AFAIK on windows, you should use " for quoting, not '. This command line results in argv[0] == "./lyx" argv[1] == "-x" argv[2] == "command-sequence buffer-load UserGuide.lyx ; buffer-begin ; repeat 100 screen-down ; lyx-quit" in linux, and that works fine (apart from an assert): Assertion triggered in lyx::frontend::FontLoader& lyx::theFontLoader() by failing check "theApp" in file ../../../src/frontends/Application.C:107 Assertion triggered in T* boost::scoped_ptr<T>::operator->() const [with T = lyx::LyXServer] by failing check "ptr != 0" in file ../../boost/boost/scoped_ptr.hpp:94 Georg
