From d283e988f39cf41036202e0ed815c4b9506af300 Mon Sep 17 00:00:00 2001 From: fdai7451 Date: Sat, 21 Jan 2023 16:11:35 +0100 Subject: [PATCH] feat: add session based command history --- src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.rs b/src/main.rs index f60ae72..332e744 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,6 +6,7 @@ mod prompt; use crate::error::ShellError; use execute::interpret; +use rustyline::config::Configurer; use rustyline::error::ReadlineError; use rustyline::{Editor, Result}; @@ -18,6 +19,7 @@ fn main() -> Result<()> { }); let mut rl = Editor::<()>::new()?; + rl.set_auto_add_history(true); let mut prompt = Prompt::new();