mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-26 05:47:32 +00:00
Use one-line view when output is not to a terminal
This commit is contained in:
parent
44a9819417
commit
35a0ba3ba0
@ -74,8 +74,10 @@ impl Options {
|
||||
Lines
|
||||
}
|
||||
else {
|
||||
let (console_width, _) = term::dimensions().unwrap_or((80, 24));
|
||||
Grid(matches.opt_present("across"), console_width)
|
||||
match term::dimensions() {
|
||||
None => Lines,
|
||||
Some((width, _)) => Grid(matches.opt_present("across"), width),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user