From 04bcd546b2446a188bb098455817228381d195df Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Thu, 16 Apr 2020 20:10:00 +0200 Subject: [PATCH] Also add NetBSD and OpenBSD --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 44540d3..5aa4bc8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -175,7 +175,7 @@ fn run() -> Result { }; let cmd: Vec<&str> = if cfg!(unix) { - if !cfg!(any(target_os = "macos", target_os = "dragonfly", target_os = "freebsd")) { + if !cfg!(any(target_os = "macos", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd")) { // Assume ls is GNU ls gnu_ls("ls") } else { @@ -200,7 +200,8 @@ fn run() -> Result { "-d", // '--directory' is not available, but '-d' is ]; - if colored_output { + if !cfg!(any(target_os = "netbsd", target_os = "openbsd")) && colored_output { + // -G is not available in NetBSD's and OpenBSD's ls cmd.push("-G"); }