From 2f03557c03daeb804633defd2b45416cf61e8922 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Tue, 10 Mar 2026 22:32:12 +0800 Subject: [PATCH] fix(ls): force LC_ALL=C to prevent empty output on non-English locales --- src/ls.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ls.rs b/src/ls.rs index a6b9df33..8727c613 100644 --- a/src/ls.rs +++ b/src/ls.rs @@ -52,6 +52,7 @@ pub fn run(args: &[String], verbose: u8) -> Result<()> { // Build ls -la + any extra flags the user passed (e.g. -R) // Strip -l, -a, -h (we handle all of these ourselves) let mut cmd = Command::new("ls"); + cmd.env("LC_ALL", "C"); // Force standard locale for predictable parsing cmd.arg("-la"); for flag in &flags { if flag.starts_with("--") {