From 3e699db57c58ce722fd20ca3fc8492a5de6723f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20N=2E=20Robalino?= Date: Mon, 26 Aug 2019 17:41:57 -0500 Subject: [PATCH] Aviso. --- src/cli.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cli.rs b/src/cli.rs index fa3a275c2..614ad28f9 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -217,6 +217,7 @@ pub async fn cli() -> Result<(), Box> { 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> { } ctrlcbreak = false; } + + // we are ok if we can not save history let _ = rl.save_history("history.txt"); Ok(())