chalk
chalk copied to clipboard
`chalk foo` should error unless `foo` is a valid command
Example
Run chalk with an invalid command name, such as:
chalk inserrt my_artifact
Expected behavior
Produce an error, saying that inserrt is not a valid command name.
For example, in other tools:
$ git checkoutt main
git: 'checkoutt' is not a git command. See 'git --help'.
The most similar command is
checkout
$ docker buildd
docker: 'buildd' is not a docker command.
See 'docker --help'
Observed behavior
Exits with an exit status of 0, after searching the docs for the invalid command:
$ chalk inserrt my_artifact
Searching Documentation For Terms: Inserrt, My_Artifact
No Matches Found In Command-Line Flag Documentation
No Matches In Configuration Variables
No Matches In Found Metadata Key Docs
No Matches In Other Documents.
Impact and discussion
A user may make a typo when adding chalk commands to scripts. Currently, this would cause unexpected behavior more quietly than it should.
I also do not expect chalk foo to search the docs for foo, and I can't think of a CLI tool that does that. I think that searching the docs should be explicit.