guix-devel
[Top][All Lists]
Advanced

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

Re: (Ab?)using aliases to set ls' and others' colours


From: Ricardo Wurmus
Subject: Re: (Ab?)using aliases to set ls' and others' colours
Date: Thu, 05 Jul 2018 00:17:39 +0200
User-agent: mu4e 1.0; emacs 26.1

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




reply via email to

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