Browse Source

feat: add session based command history

main
fdai7451 2 years ago
parent
commit
d283e988f3
  1. 2
      src/main.rs

2
src/main.rs

@ -6,6 +6,7 @@ mod prompt;
use crate::error::ShellError; use crate::error::ShellError;
use execute::interpret; use execute::interpret;
use rustyline::config::Configurer;
use rustyline::error::ReadlineError; use rustyline::error::ReadlineError;
use rustyline::{Editor, Result}; use rustyline::{Editor, Result};
@ -18,6 +19,7 @@ fn main() -> Result<()> {
}); });
let mut rl = Editor::<()>::new()?; let mut rl = Editor::<()>::new()?;
rl.set_auto_add_history(true);
let mut prompt = Prompt::new(); let mut prompt = Prompt::new();

Loading…
Cancel
Save