Closed RustyJoeM closed 2 years ago
There is also an example with only an highlighter: https://github.com/kkawakam/rustyline/blob/master/examples/read_password.rs#L30-L32
And all Highlighter
trait methods have a default implementation that does nothing (no highlighting) so you just have to overwrite highlight_prompt impl.
perfect, thank you for direction! :)
Hello,
I have seen the example file but i find it quite confusing.
I do not need bracket matching, file completions or hinting, just plain colored prompt with some ANSI string (i got e.g. from
colored
crate, or manually written).Can I add
highlight_prompt
functionality, without all the "underlated" traits (completion, hints, validations, ...)?There are some references to
colored_prompt
in the example code, but helper has extra methods & traits that seem completely unrelated to the prompt higlighting, and it's not clear whether they can/should be replaced with some placeholder code to keep other functionality intact.