picocli
picocli copied to clipboard
Customize error messages
Hi!
Is it possible to customize the following errors / messages?
- "Missing required subcommand"
- "Unmatched argument at index
" (misspelled command or unexpected option / subcommand provided) - "Did you mean ... ?" (command hint)
Thank you.
Hi @vonZeppelin
No this is currently not possible, error messages are hard-coded as of picocli 4.6.1. Possibly related issue is this one: https://github.com/remkop/picocli/issues/485
Pull requests are always welcome! 😉
Hi @remkop,
Thank you for such quick response!
So as I understand it's possible to change behaviour / message for "Missing required option: ..." case by providing custom IParameterExceptionHandler
, would it be similar direction for cases listed above?
Thank you!
Yes I believe so.