argbash
argbash copied to clipboard
Typo correction
It would be nice to have support for typo detection/suggestion, so e.g.
script --hepl
would produce a --hepl is an invalid argument, did you mean --help?
message
Hello, have you considered using ARG_RESTRICT_VALUES
as documented in https://argbash.readthedocs.io/en/latest/guide.html#convenience-macros?
Regarding suggestions, that requires quite complex logic that would have to be implemented in Bash - one would need to "compute" the "distance" of the supplied string from existing options, and then suggesting to select existing one. If you have Bash code in mind that could do this, please go ahead and suggest that.
I think ARG_RESTRICT_VALUES is probably what I want, by the documentation and examples don't sufficiently describe how the three options differ