[Aside: apologies if this is in the wrong format or otherwise contravenes
convention here - I'm not familiar with patch-oriented code bases; I'd have
raised an issue but I didn't see anywhere to do that and the busybox
website keeps on timing out on me]

This patch was made to commit 836b79211df3aeaba1b8b65c6db5ee6193172cc0.

The standard `ls` command uses the value "never" (not "none") to signify
that the output should not be colorized. This change lets the same value
apply consistently to `busybox ls` too.

diff --git a/coreutils/ls.c b/coreutils/ls.c
index 48f5eb482..b446e5648 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -1148,8 +1148,8 @@ int ls_main(int argc UNUSED_PARAM, char **argv)
  /* set G_show_color = 1/0 */
  if (ENABLE_FEATURE_LS_COLOR_IS_DEFAULT && !is_TERM_dumb()) {
  char *p = getenv("LS_COLORS");
- /* LS_COLORS is unset, or (not empty && not "none") ? */
- if (!p || (p[0] && strcmp(p, "none") != 0)) {
+ /* LS_COLORS is unset, or (not empty && not "none" && not "never") ? */
+ if (!p || (p[0] && strcmp(p, "none") != 0 && strcmp(p, "never") != 0)) {
  if (isatty(STDOUT_FILENO)) {
  /* check isatty() last because it's expensive (syscall) */
  G_show_color = 1;
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to