From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path: P@draigBrady.com
Message-ID: <52D6552B.6040704@draigBrady.com>
Date: Wed, 15 Jan 2014 09:30:19 +0000
From: =?ISO-8859-1?Q?P=E1draig_Brady?=
MIME-Version: 1.0
To: Karel Zak
CC: Felix Miata , util-linux@vger.kernel.org
Subject: Re: global fdisk colors disable
References: <52D62F0C.9060308@earthlink.net> <20140115082708.GH12700@x2.net.home>
In-Reply-To: <20140115082708.GH12700@x2.net.home>
Content-Type: text/plain; charset=ISO-8859-1
List-ID:
On 01/15/2014 08:27 AM, Karel Zak wrote:
> On Wed, Jan 15, 2014 at 01:47:40AM -0500, Felix Miata wrote:
>> Is there a way to do $SUBJECT? One really shouldn't have to resort to using
>> -L on every invocation to be able to see fdisk output.
>
> Does it mean that fdisk output is broken or you just don't like
> colors? You can use:
>
> alias fdisk=fdisk -L=never
>
> in your shell profile or rc file.
>
>> I see nothing in the
>> man page about any kind of config file. I don't think there's ever been a
>> reason to configure it before.
>
> Well, I guess that more people prefer colorized output so this
> feature is enabled by default.
>
>
> I have already thought about it and it would be probably nice to have
> a way how to globally configure colors for all command line utils
> (e.g. util-linux, coreutils, ...).
>
> It seems we have no standard and package independent solution now,
> so distributions use things like "alias" in shell profile files (for
> example for ls(1), grep(1), ...). It would be nice to have at least
> global variable (something like COLOR_MODE={auto,never,always}) to
> avoid aliases with --color= option. (CC: Padraig ;-)
I think the current mechanism used is best.
I.E. default to showing colors when possible but give an option to disable.
Global env vars come with their own disadvantages.
However I will say that one has to be careful when using colors,
and the use in fdisk seems a bit redundant. I.E. colors are useful
to distinguish things, like the portion of a match in grep or
the type of a file in ls. I'm not sure the items distinguished
in fdisk non obvious and worth the hassle of worrying about color.
thanks,
Pádraig.