autolab / Autolab-CLI

Command line autolab client that uses the Autolab API
3 stars 2 forks source link

Bizarre restrictions on argument order for "autolab submit" #27

Open zackw opened 1 year ago

zackw commented 1 year ago
$ autolab submit -f 15213-s23:attacklab test.txt
fatal: Invalid command line argument 'test.txt'.
Note that all options must come after all positional arguments (e.g. commands).
For detailed usage, run with '-h'.

This is an extremely strange thing for a Unix command line utility to insist on. I've been mucking around with Unix for 35 years and the only other examples I can think of are find (where the stuff that comes after the positional arguments is more accurately described as an expression in a mini-language, not options) and ld (where everyone agrees that it sucks that you have to put the -l options at the end of the link line).

Please change this to be more normal, by which I mean "options can appear in any order and in any position relative to the positional parameters." It's OK if "submit" has to come before options that are specific to the submit subcommand, but I should be allowed to do what I did in the example at the top.

KesterTan commented 1 year ago

Thanks for raising this issue, we'll take a look at it and make changes.