From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: (Ab?)using aliases to set ls' and others' colours Date: Thu, 05 Jul 2018 00:17:39 +0200 Message-ID: <87lgaq1w8s.fsf@elephly.net> References: <20180703101553.702b0b00@alma-ubu> <8736x0fvbr.fsf@lapdog.tobias.gr> <87zhz8eeh1.fsf@lapdog.tobias.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faq68-00083k-2H for guix-devel@gnu.org; Wed, 04 Jul 2018 18:18:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faq64-0005jU-2h for guix-devel@gnu.org; Wed, 04 Jul 2018 18:18:04 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21032) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1faq63-0005iu-Og for guix-devel@gnu.org; Wed, 04 Jul 2018 18:18:00 -0400 In-reply-to: <87zhz8eeh1.fsf@lapdog.tobias.gr> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Tobias Geerinckx-Rice Cc: guix-devel Hi Tobias, > Tobias Geerinckx-Rice wrote: >> Bj=C3=B6rn H=C3=B6fling wrote: >>> ls has a colored output. Nice. >>> ls | less has ugly escape sequences. Only ls --color=3Dno | less >>> works. >> >> I'd be surprised if =E2=80=98ls | less -R=E2=80=99 didn't (and that woul= d be a bug). >> >> Otherwise, this is standard behaviour for both =E2=80=98ls=E2=80=99 and = =E2=80=98less=E2=80=99. > > Apologies, I made a reado. > > =E2=80=98ls | $foo=E2=80=99 should indeed detect a missing tty and stop s= pewing colour > automatically. At least if =E2=80=98ls=E2=80=99 is properly aliased to = =E2=80=98ls > --color=3Dauto=E2=80=99. > > Instead, it is aliased[0] to use =E2=80=98--color=E2=80=99 =E2=80=94 shor= t for =E2=80=98ls > --color=3Dalways=E2=80=99 =E2=80=94 for reasons I cannot understand. We d= o the same for > =E2=80=98grep=E2=80=99. I think this is simply a mistake. Using =E2=80=9C--color=3Dauto=E2=80=9D i= s 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