Browse Source

Don't assume connection to a tty when number of columns is set

goth-turtle 4 years ago
parent
commit
4b76aa9ae4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main.rs

+ 1 - 1
src/main.rs

@@ -66,7 +66,7 @@ fn main() {
             let writer = io::stdout();
 
             let console_width = options.view.width.actual_terminal_width();
-            let theme = options.theme.to_theme(console_width.is_some());
+            let theme = options.theme.to_theme(unsafe {libc::isatty(1)} != 0);
             let exa = Exa { options, writer, input_paths, theme, console_width, git };
 
             match exa.run() {