Closed et1975 closed 5 years ago
If this is troubling you a workaround I've been using is
type NopeArgs =
| [<Hidden>] NeverUsed
with
interface IArgParserTemplate with
member s.Usage =
match s with
| NeverUsed _ -> "Never displayed"
and using ParseResults
Description
The fact that something is a subcommand seems to be inferred based on wether or not it has sub-arguments. If my subcommand has none the parser assumes it's an option and complains that no subcommand is specified.
Repro steps
When asked for sub-command, the definition above would result in:
./xbee --port /dev/ttyS4 --bps 115200 getmac
Expected
An attribute, or better yet model that supports expressing subcommands in their own DU. Maybe related to #68.
Actual
Either not possible or it is underdocumented (I could not see anything like this in the tests either)
Known workarounds
None that I can see.
Related information