This works, but is cumbersome to add more options to as the string is manually configured, and making sure the flags match their string, etc.
The switch for using the manually created string instead of relying on argparse was done in #116, with the reason that command would show up as optional and many part ([command, ...]) because of the nargs='*' on it. This is confusing though as command is only optional when using --update_cache, and then otherwise required. Hence the manually set string.
The node client on the other hand does:
Usage: tldr command [options]
This is preferable imo to our current approach as we then let argparse to show our options below automatically and we should never have to touch the usage string again.
The current usage text for the client is:
This works, but is cumbersome to add more options to as the string is manually configured, and making sure the flags match their string, etc.
The switch for using the manually created string instead of relying on argparse was done in #116, with the reason that
command
would show up as optional and many part ([command, ...]
) because of thenargs='*'
on it. This is confusing though ascommand
is only optional when using--update_cache
, and then otherwise required. Hence the manually set string.The node client on the other hand does:
This is preferable imo to our current approach as we then let argparse to show our options below automatically and we should never have to touch the usage string again.