1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2026-04-18 13:24:04 +00:00

Make uutils coreutils ls behave the same as GNU coreutils ls

Ubuntu 25.10 uses a rust rewrite of GNU coreutils called `uutils coreutils`.
Calling `ls --version` on that config yields `ls (uutils coreutils) 0.2.2`.
Since the regex does not match the string, it falls back to the BSD branch.
That leads to `ls` being aliased as `ls -G` without any colors in the output.

Since `uutils coreutils` claims that `uutils coreutils aims to be a drop-in replacement for the GNU utils. Differences with GNU are treated as bugs.` it should be safe to treat it the same way in the code.

Adjust the `utility` module to detect `uutils ls` as `GNU ls` by extending the regex pattern.
This commit is contained in:
Łukasz Matysiak
2026-01-15 13:18:08 +01:00
committed by Indrajit Raychaudhuri
parent 7b3b798eb5
commit 43bf17169c

View File

@@ -76,7 +76,7 @@ if zstyle -T ':prezto:module:utility' safe-ops; then
fi
# ls
if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*(GNU|lsd) *} ]]; then
if [[ ${(@M)${(f)"$(ls --version 2>&1)"}:#*(GNU|lsd|uutils) *} ]]; then
# GNU Core Utilities
if zstyle -T ':prezto:module:utility:ls' dirs-first; then