diff options
-rw-r--r-- | cli/tools/repl.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cli/tools/repl.rs b/cli/tools/repl.rs index 069d3e417..891b2425d 100644 --- a/cli/tools/repl.rs +++ b/cli/tools/repl.rs @@ -19,6 +19,8 @@ use rustyline::highlight::Highlighter; use rustyline::validate::ValidationContext; use rustyline::validate::ValidationResult; use rustyline::validate::Validator; +use rustyline::CompletionType; +use rustyline::Config; use rustyline::Context; use rustyline::Editor; use rustyline_derive::{Helper, Hinter}; @@ -304,7 +306,11 @@ struct ReplEditor { impl ReplEditor { pub fn new(helper: EditorHelper, history_file_path: PathBuf) -> Self { - let mut editor = Editor::new(); + let editor_config = Config::builder() + .completion_type(CompletionType::List) + .build(); + + let mut editor = Editor::with_config(editor_config); editor.set_helper(Some(helper)); editor.load_history(&history_file_path).unwrap_or(()); |