Skip to content
Myr

Fix --list-details on FreeBSD

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tobias Kortkamp · committed by David Peter · parent fe00860 · Browse files · 1 file+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:src/main.rs+5 added-5 removed
173 unmodified lines
174 ]175 };176177 let cmd: Vec<&str> = if cfg!(unix) {178 if !cfg!(target_os = "macos") {179 // Non-MacOS Unix178 if !cfg!(any(target_os = "macos", target_os = "dragonfly", target_os = "freebsd")) {179 // Assume ls is GNU ls180 gnu_ls("ls")181 } else {182 // MacOS182 // MacOS, DragonFlyBSD, FreeBSD183 use std::process::{Command, Stdio};184185 // Use GNU ls, if available (support for --color=auto, better LS_COLORS support)186 let gnu_ls_exists = Command::new("gls")
6 unmodified lines
193 if gnu_ls_exists {194 gnu_ls("gls")195 } else {196 let mut cmd = vec![197 "ls", // MacOS version of ls197 "ls", // BSD version of ls198 "-l", // long listing format199 "-h", // '--human-readable' is not available on MacOS, '-h' is199 "-h", // '--human-readable' is not available, '-h' is200 "-d", // '--directory' is not available, but '-d' is201 ];202203 if colored_output {
196 unmodified lines