From 1b4f7b34c89e3919bbb901ac79a40c979c832c64 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Mon, 17 May 2021 18:01:34 -0500 Subject: [PATCH] don't let externals break ansi escapes (#3438) --- crates/nu-command/src/commands/run_external.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/nu-command/src/commands/run_external.rs b/crates/nu-command/src/commands/run_external.rs index 8adcde2af6..aff580adbf 100644 --- a/crates/nu-command/src/commands/run_external.rs +++ b/crates/nu-command/src/commands/run_external.rs @@ -114,6 +114,12 @@ impl WholeStreamCommand for RunExternalCommand { external_redirection, ); + // When externals return, don't let them mess up the ansi escapes + #[cfg(windows)] + { + let _ = nu_ansi_term::enable_ansi_support(); + } + Ok(result?.to_action_stream()) } }