public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: "Pádraig Brady" <P@draigBrady.com>
Cc: Felix Miata <mrmazda@earthlink.net>, util-linux@vger.kernel.org
Subject: Re: global fdisk colors disable
Date: Wed, 15 Jan 2014 11:24:47 +0100	[thread overview]
Message-ID: <20140115102447.GL12700@x2.net.home> (raw)
In-Reply-To: <52D6552B.6040704@draigBrady.com>

On Wed, Jan 15, 2014 at 09:30:19AM +0000, Pádraig Brady wrote:
> 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.

As I made note on g+, on many places is the default not to show colors,
so we all have --color=auto aliases in shell profile files :-)

BTW, dmesg supports colors, but it's disabled by default -- what about
to enable it by default? (I don't want to add Fedora specific 
/etc/profile.d/colordmesg.sh ...).

> Global env vars come with their own disadvantages.

Yes.

> 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

That's exactly how fdisk uses colors :-) The another story are warning
and error messages, my experience is that people don't read it, so now
it's in red.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2014-01-15 10:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15  6:47 global fdisk colors disable Felix Miata
2014-01-15  8:27 ` Karel Zak
2014-01-15  9:30   ` Pádraig Brady
2014-01-15 10:24     ` Karel Zak [this message]
2014-01-15 14:14     ` Felix Miata
2014-01-15 14:10   ` Felix Miata
2014-01-15 15:21     ` Mike Frysinger
2014-01-16  9:24       ` Felix Miata
2014-01-16  9:59         ` Karel Zak
2014-01-15 17:11     ` Karel Zak
2014-01-16  9:06       ` Felix Miata

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140115102447.GL12700@x2.net.home \
    --to=kzak@redhat.com \
    --cc=P@draigBrady.com \
    --cc=mrmazda@earthlink.net \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox