mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-12-28 10:40:48 +00:00
Use the long view when stdout isn't a terminal and a long grid view was requested (fixes #522)
This commit is contained in:
parent
b5b731071c
commit
6010ed5213
@ -80,7 +80,7 @@ impl Mode {
|
|||||||
|
|
||||||
// If the terminal width couldn’t be matched for some reason, such
|
// If the terminal width couldn’t be matched for some reason, such
|
||||||
// as the program’s stdout being connected to a file, then
|
// as the program’s stdout being connected to a file, then
|
||||||
// fallback to the lines view.
|
// fallback to the lines or details view.
|
||||||
else if matches.has(&flags::TREE)? {
|
else if matches.has(&flags::TREE)? {
|
||||||
let details = details::Options {
|
let details = details::Options {
|
||||||
table: None,
|
table: None,
|
||||||
@ -91,7 +91,10 @@ impl Mode {
|
|||||||
|
|
||||||
Ok(Mode::Details(details))
|
Ok(Mode::Details(details))
|
||||||
}
|
}
|
||||||
else {
|
else if matches.has(&flags::LONG)? {
|
||||||
|
let details = long()?;
|
||||||
|
Ok(Mode::Details(details))
|
||||||
|
} else {
|
||||||
let lines = lines::Options { icons: matches.has(&flags::ICONS)?, };
|
let lines = lines::Options { icons: matches.has(&flags::ICONS)?, };
|
||||||
Ok(Mode::Lines(lines))
|
Ok(Mode::Lines(lines))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user