poetry-exec-plugin icon indicating copy to clipboard operation
poetry-exec-plugin copied to clipboard

Suggest correct command if other command is very similar

Open mondeja opened this issue 1 year ago • 0 comments

For example if I execute poetry exec docs and a doc command exists, instead of showing this error (current):

$ poetry exec docs

Unable to find the command 'docs'. To configure a command you must add it to your pyproject.toml under the path [tool.poetry-exec-plug
in.commands]. For example:

[tool.poetry-exec-plugin.commands]
docs = "echo Hello World"

It would show something like:

$ poetry exec docs

Unable to find the command 'docs'. Perhaps you wanted to run the 'doc' command?
npm output
$ npm run docs
npm ERR! Missing script: "docs"
npm ERR! 
npm ERR! Did you mean one of these?
npm ERR!     npm run doc
npm ERR!     npm run doc:show
npm ERR! 
npm ERR! To see a list of scripts, run:
npm ERR!   npm run

mondeja avatar Aug 12 '22 12:08 mondeja