Allow templates to change the error message strings #2196
Labels
A-help
Area: documentation, including docs.rs, readme, examples, etc...
C-enhancement
Category: Raise on the bar on expectations
S-duplicate
Status: Closed as Duplicate
Milestone
Before anything, this library is great! Thanks!
Make sure you completed the following tasks
Describe your use case
I prefer printing
ERROR: ...
instead oferror: ...
, and to make the background red, instead of the foreground.Describe the solution you'd like
Allow the user to set the
"error: "
string, which is currently hard-coded, seeclap/src/parse/errors.rs
Line 401 in 97b4fb6
Allow the user to change the colors, currently hard-coded, see
clap/src/output/fmt.rs
Line 53 in 97b4fb6
You could create a
StyleSetting
struct and a mechanism similar toAppSettings
.Additional context
Similar to #2035, but instead of allowing usage of Clap's error formatting, allow the user to customize Clap's messages and style to fit his preferences.
The text was updated successfully, but these errors were encountered: