-
Notifications
You must be signed in to change notification settings - Fork 4
Description
It's not always clear whether to use a command-line option or a subcommand. For example, should I type foo --help, foo help, or foo -h? What about foo -version, foo --version, or foo version?
If there's no matching option for one specified on the command line, check for a subcommand by the same name, and vise versa, and suggest it to the user. deft --version => "did you mean deft version"
Relatedly, we could also do better here:
$ deft -version
Error: Unrecognized option: -v
by suggesting deft version instead.
Or just generally accept full-word options with a single dash when it makes sense to do so? I.e., not all of the single letter options exist and the full-word option does.
(This begs the question why I made deft version a subcommand instead of a global option, but we won't talk about that.)