update the ide_completions example with more cases to explore (#718)

This commit is contained in:
Michael Angerman 2024-01-22 14:09:59 -08:00 committed by GitHub
parent cbb56e25d0
commit ede2defbfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,10 +61,27 @@ fn main() -> io::Result<()> {
let commands = vec![
"test".into(),
"clear".into(),
"exit".into(),
"history 1".into(),
"history 2".into(),
"logout".into(),
"login".into(),
"hello world".into(),
"hello world reedline".into(),
"hello world something".into(),
"hello world another".into(),
"hello world 1".into(),
"hello world 2".into(),
"hello another very large option for hello word that will force one column".into(),
"this is the reedline crate".into(),
"abaaabas".into(),
"abaaacas".into(),
"ababac".into(),
"abacaxyc".into(),
"abadarabc".into(),
];
let completer = Box::new(DefaultCompleter::new_with_wordlen(commands, 2));
// Use the interactive menu to select options from the completer