From: Ricardo Wurmus <rekado@elephly.net>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: (Ab?)using aliases to set ls' and others' colours
Date: Thu, 05 Jul 2018 00:17:39 +0200 [thread overview]
Message-ID: <87lgaq1w8s.fsf@elephly.net> (raw)
In-Reply-To: <87zhz8eeh1.fsf@lapdog.tobias.gr>
Hi Tobias,
> Tobias Geerinckx-Rice wrote:
>> Björn Höfling wrote:
>>> ls has a colored output. Nice.
>>> ls | less has ugly escape sequences. Only ls --color=no | less
>>> works.
>>
>> I'd be surprised if ‘ls | less -R’ didn't (and that would be a bug).
>>
>> Otherwise, this is standard behaviour for both ‘ls’ and ‘less’.
>
> Apologies, I made a reado.
>
> ‘ls | $foo’ should indeed detect a missing tty and stop spewing colour
> automatically. At least if ‘ls’ is properly aliased to ‘ls
> --color=auto’.
>
> Instead, it is aliased[0] to use ‘--color’ — short for ‘ls
> --color=always’ — for reasons I cannot understand. We do the same for
> ‘grep’.
I think this is simply a mistake. Using “--color=auto” is correct here.
> On the other hand, what I consider an obvious bug has been around
> since literal forever[1], so maybe I'm missing something obvious
> here. I've CC'd the original author. If everyone agrees or nobody
> responds, I'd like to change it to something less aggressive before
> 0.15.[2]
No objections from me. Thank you!
--
Ricardo
next prev parent reply other threads:[~2018-07-04 22:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-03 8:15 Installation-Protocol for GuixSD x86_64 v0.15-preview Björn Höfling
2018-07-03 10:49 ` Tobias Geerinckx-Rice
2018-07-03 11:38 ` (Ab?)using aliases to set ls' and others' colours Tobias Geerinckx-Rice
2018-07-04 18:01 ` Björn Höfling
2018-07-04 22:17 ` Ludovic Courtès
2018-07-04 22:17 ` Ricardo Wurmus [this message]
2018-07-04 17:56 ` Installation-Protocol for GuixSD x86_64 v0.15-preview Björn Höfling
2018-07-03 13:20 ` Marius Bakke
2018-07-03 13:27 ` Danny Milosavljevic
2018-07-03 21:35 ` Ludovic Courtès
2018-07-04 14:10 ` KDFONTOP/PIO_UNIMAPCLR: Input/output error Ludovic Courtès
2018-07-04 14:29 ` Marius Bakke
2018-07-04 22:20 ` Ludovic Courtès
2018-07-03 21:42 ` Installation-Protocol for GuixSD x86_64 v0.15-preview Ludovic Courtès
2018-07-04 18:06 ` Björn Höfling
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=87lgaq1w8s.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=guix-devel@gnu.org \
--cc=me@tobias.gr \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.