mainargs
mainargs copied to clipboard
Flags optional arguments
Is it possible to have a flag with optional arguments?
I want to be able to pass --mirror and --mirror <path>. Either mirror is missing, present without a value, or present with a value.
Currently it is not possible. It might be possible to implement, with some caveats (e.g. <path> would not be able to start with - or --, <path> would take precedence over mainargs.Leftover), but those may be OK tradeoffs for the convenience