@@ -1,4 +1,7 @@
1−use crossterm::style::{Color, Print, Stylize};
1+use crossterm::{
2+ style::{Color, Print, Stylize},
3+ tty::IsTty,
4+};
25use helix_core::config::{default_syntax_loader, user_syntax_loader};
36use helix_loader::grammar::load_runtime_file;
47use std::io::Write;
@@ -106,17 +109,19 @@ pub fn languages_all() -> std::io::Result<()> {
106109
107110 let terminal_cols = crossterm::terminal::size().map(|(c, _)| c).unwrap_or(80);
108111 let column_width = terminal_cols as usize / headings.len();
112+ let is_terminal = std::io::stdout().is_tty();
109113
110114 let column = |item: &str, color: Color| {
111− let data = format!(
115+ let mut data = format!(
112116 "{:width$}",
113117 item.get(..column_width - 2)
114118 .map(|s| format!("{}…", s))
115119 .unwrap_or_else(|| item.to_string()),
116120 width = column_width,
117− )
118− .stylize()
119− .with(color);
121+ );
122+ if is_terminal {
123+ data = data.stylize().with(color).to_string();
124+ }
120125
121126 // We can't directly use println!() because of
122127 // https://github.com/crossterm-rs/crossterm/issues/589