swth: do not ignore keyword arguments after positional argument
Previously, swth go --biber would silently use biblatex. Now it works!
I don't get it, can you give an example?
On second thought, No, swth go is not meant to take options.
It really should take info from the .swth file
Before, all keyword arguments after the command were silently ignored. While swth --dry-run go did a dry run as expected, swth go --dry-run did an actual run. It's just about typing convenience. (Personally, I think --dry-run is simpler than modifying the .swth file for a single invocation, but that's just an opinion ...)
It's the same for swth create and others. Unless you want to eliminate all keyword arguments in this script, this patch will make sure that they are not ignored just because they appear after instead of before the command. Nothing else. :-)
I understand.
But I disagree. The options ought to come before the command, because all arguments after the command are intended to be passed through. So
swth latex -interaction=nonstopmode
or
swth --dry-run latex -interaction=nonstopmode
ought to work.
It still does make only little sense for swth go
The options ought to come before the command, because all arguments after the command are intended to be passed through.
Ah, now I see! Thanks for the explanation! Do you think it would make sense to alter
https://github.com/krono/swathesis/blob/08dfb005c9f983c20225fddf6d968bdcb4e22641/swth#L15
like
USAGE="Usage: $PROGRAM [OPTIONS] COMMAND [COMMAND_OPTIONS]
to avoid future confusion in naive script users like me? :)
Well if you care that much.
swth is merely a tiny helper from times long before I knew arara or latexmk.
So keeping this in mind, it is just a tiny tool :)