diff options
Diffstat (limited to 'src/run/mod.rs')
| -rw-r--r-- | src/run/mod.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/run/mod.rs b/src/run/mod.rs index dc715b1..a2a6cb1 100644 --- a/src/run/mod.rs +++ b/src/run/mod.rs @@ -614,20 +614,14 @@ pub fn run_quiet( exec.exec_loop(cmd, &mut [c1, c2]) } -pub fn run(se: Arc<Mutex<Session>>, parsed: Ast<PreExpansion>) { +pub fn run(se: Arc<Mutex<Session>>, parsed: Ast<PreExpansion>) -> String { se.lock().unwrap().raw_disable(); let result = exec(se.clone(), parsed); se.lock().unwrap().raw_enable(); - if se.lock().unwrap().loud { - let status_string = match result { - Ok(_) => String::new(), - Err(e) => format!("{}\r\n", e.error_message()), - }; - - print!("\r{status_string}"); - Session::reprint_prompt(se); - let _ = std::io::stdout().lock().flush(); + match result { + Ok(_) => String::new(), + Err(e) => format!("{}", e.error_message()), } } |
