GNU bug report logs - #15992
'ls' ignores term capabilities when generating color.

Previous Next

Package: coreutils;

Reported by: Linda Walsh <coreutils <at> tlinx.org>

Date: Thu, 28 Nov 2013 20:32:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


Message #20 received at 15992 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Guilherme de Almeida Suckevicz <guito.linux <at> gmail.com>
Cc: 15992 <at> debbugs.gnu.org
Subject: Re: bug#15992: 'ls' ignores term capabilities when generating color.
Date: Wed, 16 Apr 2014 16:56:04 +0100
[Message part 1 (text/plain, inline)]
On 04/16/2014 02:51 PM, Guilherme de Almeida Suckevicz wrote:
> Hi Pádraig,
> 
> I made a patch for this issue according to the tips above.
> I hope that is ok!
> 
> [guilherme <at> almeida build]$ diff ../src/ls.c ../src/ls-orig.c

Note the patch is reversed, also we prefer unified format,
also we'd much prefer a patch against the git repo.
For general notes on supplying patches see:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=README-hacking;hb=HEAD

> 2372,2382c2339
> <     {
> <       /* If COLORTERM is not set, check if the term type is know. */
> <       if (getenv ("COLORTERM") == NULL)
> <     {
> <       if (! know_term_type ())
> <         {
> <           print_with_color = false;
> <           return;
> <         }
> <     }

          you want a return here too

> <     }

I've cleaned up the patch and added a test.
If you're Ok with it I'll push.

thanks,
Pádraig.

[ls-dumb-term.patch (text/x-patch, attachment)]

This bug report was last modified 11 years and 94 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.