diff --git a/src/main.rs b/src/main.rs index e79b195..2b9ae7c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,6 +5,7 @@ use execute::interpret; use rustyline::completion::FilenameCompleter; use rustyline::config::Configurer; use rustyline::error::ReadlineError; +use rustyline::hint::HistoryHinter; use rustyline::{CompletionType, Config, Editor, Result}; use rustyline_derive::{Completer, Helper, Highlighter, Hinter, Validator}; use whoami::username; @@ -20,6 +21,8 @@ mod prompt; struct EditorHelper { #[rustyline(Completer)] completer: FilenameCompleter, + #[rustyline(Hinter)] + hinter: HistoryHinter, } fn main() -> Result<()> { @@ -34,6 +37,7 @@ fn main() -> Result<()> { let helper = EditorHelper { completer: FilenameCompleter::new(), + hinter: HistoryHinter {}, }; let mut rl = Editor::with_config(config)?;