{"id":"52d4b4e992fc9b42","repo":"sharkdp/fd","slug":"fd-list-details-is-not-supported-on-windows-un","errorCode":null,"errorMessage":"'fd --list-details' is not supported on Windows unless GNU 'ls' is installed.","messagePattern":"'fd --list-details' is not supported on Windows unless GNU 'ls' is installed\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/main.rs","lineNumber":484,"sourceCode":"\n                cmd\n            }\n        }\n    } else if cfg!(windows) {\n        use std::process::{Command, Stdio};\n\n        // Use GNU ls, if available\n        let gnu_ls_exists = Command::new(\"ls\")\n            .arg(\"--version\")\n            .stdout(Stdio::null())\n            .stderr(Stdio::null())\n            .status()\n            .is_ok();\n\n        if gnu_ls_exists {\n            gnu_ls(\"ls\")\n        } else {\n            return Err(anyhow!(\n                \"'fd --list-details' is not supported on Windows unless GNU 'ls' is installed.\"\n            ));\n        }\n    } else {\n        return Err(anyhow!(\n            \"'fd --list-details' is not supported on this platform.\"\n        ));\n    };\n    Ok(cmd)\n}\n\nfn extract_time_constraints(opts: &Opts) -> Result<Vec<TimeFilter>> {\n    let mut time_constraints: Vec<TimeFilter> = Vec::new();\n    if let Some(ref t) = opts.changed_within {\n        if let Some(f) = TimeFilter::after(t) {\n            time_constraints.push(f);\n        } else {\n            return Err(anyhow!(","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/sharkdp/fd/blob/41532d114e2ba565fb5367d606c111b29b96450c/src/main.rs#L466-L502","documentation":"Thrown in src/main.rs:484 by the list-details command builder. On Windows fd shells out to an external 'ls' for --list-details output; it probes 'ls --version' and only accepts GNU ls. If 'ls' is missing or is the non-GNU default Windows/dir utility, the feature is unsupported.","triggerScenarios":"Running 'fd --list-details' on Windows where GNU coreutils ls is not on PATH (no Git-Bash/MSYS2/GnuWin32 ls, or 'ls' resolves to something that doesn't understand --version).","commonSituations":"Stock Windows without coreutils; PowerShell where 'ls' aliases to a built-in; PATH ordering putting a non-GNU ls first.","solutions":["Install GNU coreutils (e.g. via 'winget install GnuWin32 coreutils' or scoop/git), ensure its 'ls' answers 'ls --version' with a GNU banner, and put it on PATH.","Drop --list-details and rely on fd's default output, or pipe to a separate 'stat'/'ls -l' step.","Run inside Git-Bash/MSYS2 where GNU ls is already available."],"exampleFix":"// before (Windows, stock)\nfd --list-details\n\n// after (Git-Bash)\nscoop install coreutils && fd --list-details","handlingStrategy":"validation","validationCode":"# Windows: confirm GNU ls answers --version before using --list-details\nif command -v ls >/dev/null 2>&1 && ls --version 2>/dev/null | grep -qi 'gnu'; then\n  fd --list-details \"$@\"\nelse\n  echo \"GNU ls required for --list-details on Windows\" >&2; exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install GNU coreutils (Git-Bash/scoop/winget) on Windows before using --list-details.","Probe 'ls --version' for 'GNU' in install/setup scripts.","Fall back to plain fd output if ls is unavailable."],"tags":["list-details","windows","external-command","platform"],"analyzedSha":"41532d114e2ba565fb5367d606c111b29b96450c","analyzedAt":"2026-08-06T01:39:28.509Z","schemaVersion":2}