Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Often when using the CLI, I'll get the argument order wrong: ``` # 1. Global arg after subcommand limmat get --run --config ~/limmat.toml checkpatch HEAD # 2. Subcommand arg before subcommand limmat --run get checkpatch HEAD ``` This produces errors that are IMO rather confusing: ``` error: unexpected argument '--config' found tip: to pass '--config' as a value, use '-- --config' ``` The error message could be improved (e.g. it could say `there is a global --config argument, did you mean to pass it before the get subcommand?`), but also there is no risk of ambiguity so in both cases the app could just _accept_ the incorrect order. This solves case 1. Case 2 seems like it could be more annoying to implement and less likely to actually help (I doubt I've actually ever made that mistake).
- Loading branch information