This commit is contained in:
Andrés N. Robalino 2019-08-26 17:41:57 -05:00
parent 91093f2ab2
commit 3e699db57c

View file

@ -217,6 +217,7 @@ pub async fn cli() -> Result<(), Box<dyn Error>> {
let _ = ansi_term::enable_ansi_support();
}
// we are ok if history does not exist
let _ = rl.load_history("history.txt");
let ctrl_c = Arc::new(AtomicBool::new(false));
@ -297,6 +298,8 @@ pub async fn cli() -> Result<(), Box<dyn Error>> {
}
ctrlcbreak = false;
}
// we are ok if we can not save history
let _ = rl.save_history("history.txt");
Ok(())