[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add --color option to md5sum and shaXsum

From: Eric Blake
Subject: Re: add --color option to md5sum and shaXsum
Date: Tue, 24 Dec 2013 06:40:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 12/24/2013 05:25 AM, Florent Monnier wrote:
> Hello,
> This patch adds a --color option to the commands md5sum and shaXsum.
> The goal is to make it easier to visually identify similarities in a
> list of printed checksums.

Thanks for the patch.  Several comments:

The patch is non-trivial in size; you'll need copyright assignment to
the FSF before we can apply it.  I quit looking at the patch contents
once I saw the size, so as not to taint myself if we end up needing to
reimplement it due to copyright reasons.

> It takes action only if stdout is a tty.

Better would be to copy how other coreutils program use --color, such as
ls.  The option needs to take an optional argument, so that we can do
things like --color=always to force color codes even when not outputting
to a tty (great for testing, also good for pipelines).

You are missing documentation of the new option in coreutils.texi and a
mention of the feature in NEWS.  Adding a new test to the testsuite to
ensure that the option does what you want would also be worthwhile.

Your description did not say WHAT gets colored, and since I didn't read
the body of the patch myself, I'm curious as to more details on what you
are coloring.  This is one case where a screenshot would help your case
(although it may be best if you post the screenshot on an image hosting
service and just post the URL to that location, to minimize list
bandwidth usage - not everyone likes downloading large images).

> This patch can be applied on the version 8.22 of the coreutils.

We prefer patches that are against the latest coreutils.git.  Please
read the HACKING document for more details:

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]