On 2017-03-20 18:46, Brian K. White wrote:
Similarly, trying to have a program detect that "this looks like an option but it's in the middle of a bunch of filenames" and treat that like an error is idiotic. That is a perfectly useful option which exists for a reason, not by some oversight of those stupid blundering shell or getopt authors. It's intentional to be able to, for example, build a command line from a loop, which changes options as the loop goes along. opt file file opt opt file opt file...
No, I can not agree here. It is impossible for the parser to differentiate between an option in the middle of the stream of file names, or a file that starts with a dash. it is ambiguous at best. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" (Minas Tirith))