diff --git a/src/modes/common.rs b/src/modes/common.rs index 6bbd7a2..ce04764 100644 --- a/src/modes/common.rs +++ b/src/modes/common.rs @@ -146,9 +146,13 @@ pub fn create_table(use_styling: bool) -> Table { table.set_content_arrangement(ContentArrangement::Dynamic); if use_styling { - table - .load_preset(comfy_table::presets::UTF8_FULL) - .apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS); + if std::io::stdout().is_terminal() { + table + .load_preset(comfy_table::presets::UTF8_FULL) + .apply_modifier(comfy_table::modifiers::UTF8_SOLID_INNER_BORDERS); + } else { + table.load_preset(comfy_table::presets::ASCII_FULL); + } } else { table.load_preset(comfy_table::presets::NOTHING); }