Georg Baum wrote:
Abdelrazak Younes wrote:
Not always, the -f option would be implicit if the filenames are given
first. For example these 4 command lines would be OK:
lyx UserGuide.lyx Intro.lyx -c 3 -dbg key
lyx UserGuide.lyx -c 3 -dbg key -f Intro.lyx
lyx -c 3 -dbg key -f UserGuide.lyx Intro.lyx
lyx UserGuide.lyx -c 3 -dbg key -f UserGuide.lyx -f Intro.lyx
Good.
But this one (which we allow presently) would not be OK:
lyx -c 3 -dbg key UserGuide.lyx Intro.lyx
This last syntax IMHO this is bug prone and contains an inherent
ambiguity.
Why bug prone? Some of my own programs work well like this: Parse any
potential options, and everything that is left aftre that must be a file
name.
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:
./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.
Abdel.