bug-diffutils
[Top][All Lists]
Advanced

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

[bug-diffutils] bug#20062: bug#20062: bug#20062: bug#20062: bug#20062: b


From: Giuseppe Scrivano
Subject: [bug-diffutils] bug#20062: 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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Aaron Davies <address@hidden> 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





reply via email to

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