From 4b5e8941a71ca1d52e57434f8ad4277aab1f36ee Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Thu, 16 Apr 2020 19:44:10 +0200 Subject: [PATCH] Fix --list-details on FreeBSD --- src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index fb64e7a..44540d3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -175,11 +175,11 @@ fn run() -> Result { }; let cmd: Vec<&str> = if cfg!(unix) { - if !cfg!(target_os = "macos") { - // Non-MacOS Unix + if !cfg!(any(target_os = "macos", target_os = "dragonfly", target_os = "freebsd")) { + // Assume ls is GNU ls gnu_ls("ls") } else { - // MacOS + // MacOS, DragonFlyBSD, FreeBSD use std::process::{Command, Stdio}; // Use GNU ls, if available (support for --color=auto, better LS_COLORS support) @@ -194,9 +194,9 @@ fn run() -> Result { gnu_ls("gls") } else { let mut cmd = vec![ - "ls", // MacOS version of ls + "ls", // BSD version of ls "-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 ];