From 6a18b3603705819384bd3aedef5ff81174b6b49a Mon Sep 17 00:00:00 2001 From: Klim Tsoutsman <32662194+tsoutsman@users.noreply.github.com> Date: Wed, 11 Aug 2021 04:39:10 +1000 Subject: [PATCH] Support --list-details on more platforms Implement `--list-details` by using short options for `ls` to support more platforms (like BusyBox) closes #783 --- CHANGELOG.md | 1 + src/main.rs | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9d98d6..35ba6b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - fd doesn't show substituted drive on Windows, see #365 - Properly handle write errors to devices that are full, see #737 - Use local time zone for time functions (`--change-newer-than`, `--change-older-than`), see #631 (@jacobmischka) +- Support `--list-details` on more platforms (like BusyBox), see #783 ## Changes diff --git a/src/main.rs b/src/main.rs index 99470da..7acba88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -210,11 +210,13 @@ fn run() -> Result { #[allow(unused)] let gnu_ls = |command_name| { + // Note: we use short options here (instead of --long-options) to support more + // platforms (like BusyBox). vec![ command_name, - "-l", // long listing format - "--human-readable", // human readable file sizes - "--directory", // list directories themselves, not their contents + "-l", // long listing format + "-h", // human readable file sizes + "-d", // list directories themselves, not their contents &color_arg, ] };