[git commit] ls: restore functionality of --color

Denys Vlasenko vda.linux at googlemail.com
Sat Nov 8 06:42:34 UTC 2025


commit: https://git.busybox.net/busybox/commit/?id=d549c8be8636dd523358565e573eeba4fc1f928d
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Since commit 551bfdb97 (ls: implement -q, fix -w0, reduce startup
time) the '--color' option behaves as though the default argument
'always' had been specified.

This is due to an explicit short option for '--color' being given,
but without specifying that an argument is expected.

function                                             old     new   delta
.rodata                                           106027  106029      +2

Signed-off-by: Ron Yorston <rmy at pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 coreutils/ls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/coreutils/ls.c b/coreutils/ls.c
index c24561576..40017efc6 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -231,7 +231,7 @@ SPLIT_SUBDIR    = 2,
 	IF_FEATURE_LS_WIDTH("T:w:")      /* 2, 28 */ \
 	IF_LONG_OPTS("\xff")             /* 1, 29 */ \
 	IF_LONG_OPTS("\xfe")             /* 1, 30 */ \
-	IF_LONG_OPTS("\xfd")             /* 1, 31 */ \
+	IF_LONG_OPTS("\xfd::")           /* 1, 31 */ \
 	"qk"                             /* 2, 33 */
 
 #if ENABLE_LONG_OPTS


More information about the busybox-cvs mailing list