GNU bug report logs - #20062
[PATCH] diff: add support for --color

Previous Next

Package: diffutils;

Reported by: Giuseppe Scrivano <gscrivan <at> redhat.com>

Date: Sun, 8 Mar 2015 21:57:02 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Giuseppe Scrivano <gscrivano <at> gnu.org>
To: Aaron Davies <aaron.davies <at> gmail.com>
Cc: Paul Eggert <eggert <at> cs.ucla.edu>, Eric Blake <eblake <at> redhat.com>, Jim Meyering <jim <at> meyering.net>, "20062 <at> debbugs.gnu.org" <20062 <at> debbugs.gnu.org>
Subject: bug#20062: [bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062: bug#20062: bug#20062: bug#20062: [PATCH] diff: add support for --color
Date: Wed, 28 Oct 2015 16:29:06 +0100
Aaron Davies <aaron.davies <at> gmail.com> writes:

> I'm very new here, so feel free to take my opinions with a grain of salt, but one thing I've been noticing in my scripting work is that environment variables' biggest drawback is often also their big advantage: you don't have to propagate them manually.
>
> Suppose you want to encapsulate some common diff operation in a small shell script. Then anything you want that diff to do that you specified in an alias or function in your interactive shell has to be written out again.
>
> Alternatively, you could have a diff wrapper in your ~/bin setting the option, but it's hard to actually write those correctly to handle things like stdin vs. file args.
>
> None of this comes with env vars.
>
> Still, I understand your other concerns.
>
> Maybe a ~/.diffrc is the solution?

that could be a good solution, and probably other kind of options can be
moved but IMHO it seems a bit over-engineered to read just the colors
settings.

If the choice is between an env variable or adding a new command line
argument, the former makes more sense as it works similarly to other
tools that people already know.

If there is any strong argument against not using an environment
variable as this patch is doing, I will rework the patch to use a
command line argument instead.

Regards,
Giuseppe




This bug report was last modified 8 years and 78 days ago.

Previous Next


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