fix(ls): force LC_ALL=C for predictable parsing#463
fix(ls): force LC_ALL=C for predictable parsing#463zhzy0077 wants to merge 1 commit intortk-ai:developfrom
Conversation
|
Hi! Thanks for the contribution! Since March 6, all PRs should target the Could you update the base branch? Click Edit at the top right of this PR and change it from Thanks! |
DONE. Thanks for the reminder. |
|
|
|
Hi @zhzy0077, apologies for the oversight — I opened #810 without noticing this PR already existed and addressed the same locale issue. That said, #810 covers two additional bugs on top of the LC_ALL=C fix:
If you're open to it, it might make sense to close this PR in favor of #810 which bundles all three fixes together. Either way, thanks for finding and fixing the locale issue first — sorry again for the duplicate. I've also added you as a co-author on the commit in #810 to make sure your contribution is properly credited. |
On non-English locales (e.g. zh_CN), ls -la output has a different number of columns than the 9 columns assumed by compact_ls. This change forces the C locale to ensure consistent 9-column output for reliable parsing.
e.g. for chinese it's