mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-18 09:50:34 +01:00
Fix --list-details on FreeBSD
This commit is contained in:
parent
fe00860b87
commit
4b5e8941a7
1 changed files with 5 additions and 5 deletions
10
src/main.rs
10
src/main.rs
|
@ -175,11 +175,11 @@ fn run() -> Result<ExitCode> {
|
||||||
};
|
};
|
||||||
|
|
||||||
let cmd: Vec<&str> = if cfg!(unix) {
|
let cmd: Vec<&str> = if cfg!(unix) {
|
||||||
if !cfg!(target_os = "macos") {
|
if !cfg!(any(target_os = "macos", target_os = "dragonfly", target_os = "freebsd")) {
|
||||||
// Non-MacOS Unix
|
// Assume ls is GNU ls
|
||||||
gnu_ls("ls")
|
gnu_ls("ls")
|
||||||
} else {
|
} else {
|
||||||
// MacOS
|
// MacOS, DragonFlyBSD, FreeBSD
|
||||||
use std::process::{Command, Stdio};
|
use std::process::{Command, Stdio};
|
||||||
|
|
||||||
// Use GNU ls, if available (support for --color=auto, better LS_COLORS support)
|
// Use GNU ls, if available (support for --color=auto, better LS_COLORS support)
|
||||||
|
@ -194,9 +194,9 @@ fn run() -> Result<ExitCode> {
|
||||||
gnu_ls("gls")
|
gnu_ls("gls")
|
||||||
} else {
|
} else {
|
||||||
let mut cmd = vec![
|
let mut cmd = vec![
|
||||||
"ls", // MacOS version of ls
|
"ls", // BSD version of ls
|
||||||
"-l", // long listing format
|
"-l", // long listing format
|
||||||
"-h", // '--human-readable' is not available on MacOS, '-h' is
|
"-h", // '--human-readable' is not available, '-h' is
|
||||||
"-d", // '--directory' is not available, but '-d' is
|
"-d", // '--directory' is not available, but '-d' is
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue