v4.15.0
Features
- Added
App.synonym, which declares alternate command name(s) that trigger a "Did you mean..." suggestion without registering the command under those names. Useful when a user types a semantically-equivalent word (e.g.removevsuninstall) that the built-in fuzzy matcher would miss because the words aren't spelled similarly. Accepts a singlestror an iterable of strings. Synonyms are not runnable and are hidden from--help.@app.command(synonym=["remove", "rm"]) def uninstall(name: str): ...
If multiple commands declare the same synonym, all matching commands are suggested ($ my-script remove mypackage Unknown command "remove". Did you mean "uninstall"? Available commands: uninstall.
Did you mean "uninstall" or "purge"?).
By @BrianPugh in #815
Full Changelog: v4.14.1...v4.15.0