clikt
clikt copied to clipboard
Support typo suggestions for `choice()` values
If I have an enum of ~20 values, it's not very convenient to read the current error message:
> ./amper run -p andriod
Usage: amper run [<options>] -- [<app_arguments>]...
Error: invalid value for -p: invalid choice: andriod. (choose from js, jvm, wasm, android, linuxX64, linuxArm64, tvosArm64, tvosX64, tvosSimulatorArm64, macosX64, macosArm64, iosArm64, iosSimulatorArm64, iosX64, watchosArm64, watchosArm32, watchosDeviceArm64, watchosSimulatorArm64, mingwX64, androidNativeArm32, androidNativeArm64, androidNativeX64, androidNativeX86)
It would be nice if the possibilities were filtered with the typo suggestor like it's done for options and arguments, and a nice Did you mean X? message appeared when there is only one.