mirror of
https://github.com/nushell/nushell.git
synced 2025-01-18 12:22:21 +01:00
remove is terminal check for table colors
This commit is contained in:
parent
556585fba7
commit
39efa034b9
@ -15,13 +15,7 @@ use nu_table::{
|
|||||||
StringResult, TableOpts, TableOutput,
|
StringResult, TableOpts, TableOutput,
|
||||||
};
|
};
|
||||||
use nu_utils::{get_ls_colors, terminal_size};
|
use nu_utils::{get_ls_colors, terminal_size};
|
||||||
use std::{
|
use std::{collections::VecDeque, io::Read, path::PathBuf, str::FromStr, time::Instant};
|
||||||
collections::VecDeque,
|
|
||||||
io::{IsTerminal, Read},
|
|
||||||
path::PathBuf,
|
|
||||||
str::FromStr,
|
|
||||||
time::Instant,
|
|
||||||
};
|
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
const STREAM_PAGE_SIZE: usize = 1000;
|
const STREAM_PAGE_SIZE: usize = 1000;
|
||||||
@ -1117,8 +1111,7 @@ enum TableView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn maybe_strip_color(output: String, config: &Config) -> String {
|
fn maybe_strip_color(output: String, config: &Config) -> String {
|
||||||
// the terminal is for when people do ls from vim, there should be no coloring there
|
if !config.use_ansi_coloring.get() {
|
||||||
if !config.use_ansi_coloring.get() || !std::io::stdout().is_terminal() {
|
|
||||||
// Draw the table without ansi colors
|
// Draw the table without ansi colors
|
||||||
nu_utils::strip_ansi_string_likely(output)
|
nu_utils::strip_ansi_string_likely(output)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user