Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diy_hints example code doesn't work #741

Closed
zahash opened this issue Oct 27, 2023 · 3 comments
Closed

diy_hints example code doesn't work #741

zahash opened this issue Oct 27, 2023 · 3 comments
Labels

Comments

@zahash
Copy link

zahash commented Oct 27, 2023

diy_hints example code doesn't work.
Need some nicely written examples to demonstrate auto completion features instead of a hacky mess.

@AnotherDaniel
Copy link

AnotherDaniel commented Nov 8, 2023

More specifically, the Completer, Highlighter and Validator traits are private, according to the compiler - trying this with 12.0.0.
Same here, trying to build something using Hints, but the current state of documentation/examples on this topic does make it challenging.

PR #639 seems to offer a solution to this issue... at least partially, also already has been overtaken by time it seems

@gwenn
Copy link
Collaborator

gwenn commented Nov 8, 2023

More specifically, the Completer, Highlighter and Validator traits are private, according to the compiler - trying this with 12.0.0.

https://docs.rs/rustyline/latest/rustyline/completion/trait.Completer.html

pub trait Completer {

https://docs.rs/rustyline/latest/rustyline/highlight/trait.Highlighter.html

pub trait Highlighter {

https://docs.rs/rustyline/latest/rustyline/validate/trait.Validator.html

pub trait Validator {

https://docs.rs/rustyline/latest/rustyline/derive.Completer.html

Available on crate feature derive only.

@gwenn gwenn added the invalid label Nov 8, 2023
@AnotherDaniel
Copy link

Got it now.

@gwenn gwenn closed this as completed Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants