added nu-utils crate, fixed issue where externals turn off vt processing (#4857)

* added `nu-utils` crate, fixed issue where externals turn off vt processing

* hopefully make work in non-windows environments

* clippy
This commit is contained in:
Darren Schroeder
2022-03-16 17:21:06 -05:00
committed by GitHub
parent 460d635ed0
commit ca12f39db3
11 changed files with 104 additions and 30 deletions

View File

@ -63,6 +63,12 @@ impl Command for Table {
80usize
};
// reset vt processing, aka ansi because illbehaved externals can break it
#[cfg(windows)]
{
let _ = nu_utils::enable_vt_processing();
}
match input {
PipelineData::ExternalStream { .. } => Ok(input),
PipelineData::Value(Value::Binary { val, .. }, ..) => {