matejak / argbash

Bash argument parsing code generator
Other
1.39k stars 63 forks source link

Typo correction #22

Open matejak opened 7 years ago

matejak commented 7 years ago

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

matejak commented 1 year ago

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.

gdevenyi commented 1 year ago

I think ARG_RESTRICT_VALUES is probably what I want, by the documentation and examples don't sufficiently describe how the three options differ