From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=BULK_RE_SUSP_NTLD, FROM_SUSPICIOUS_NTLD,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 5517 invoked from network); 5 Feb 2022 10:08:38 -0000 Received: from 4ess.inri.net (216.126.196.42) by inbox.vuxu.org with ESMTPUTF8; 5 Feb 2022 10:08:38 -0000 Received: from penelope.mx ([145.239.136.208]) by 4ess; Fri Feb 4 20:36:29 -0500 2022 Received: from localhost (localhost [127.0.0.1]) by penelope.mx (Postfix) with ESMTP id A68251E7E86 for <9front@9front.org>; Fri, 4 Feb 2022 23:00:46 +0100 (CET) Received: from penelope.mx ([127.0.0.1]) by localhost (penelope.mx [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id I_joenPA7KqC for <9front@9front.org>; Fri, 4 Feb 2022 23:00:46 +0100 (CET) Received: from fog.home (unknown [37.228.246.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by penelope.mx (Postfix) with ESMTPSA id D76461E7E85 for <9front@9front.org>; Fri, 4 Feb 2022 23:00:45 +0100 (CET) Message-ID: <66AC5593F9855BCA0D86C838550D56AF@0x80.stream> To: 9front@9front.org From: Nicola Girardi Date: Fri, 04 Feb 2022 22:00:45 +0000 In-Reply-To: <478C7C11218F1901581B8128FCBDC56C@eigenstate.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: deep-learning deep-learning rich-client controller Subject: Re: [9front] grep: always show path with '-n' Reply-To: 9front@9front.org Precedence: bulk Quoth ori@eigenstate.org: > Quoth Nicola Girardi : > > Quoth ori@eigenstate.org: > > > Quoth Steve Simon : > > > > the =E2=80=9Ctraditional=E2=80=9D way to achieve this is for g(1)= to always pass > > > > /dev/null to grep to ensure there are always multiple files. > > > >=20 > > >=20 > > > That's certainly *an* option, but it > > > seems surprising that 1 vs n args are > > > treated differently for '-n', and I > > > think it makes sense to make it > > > consistent. > >=20 > > I've always wondered about that behavior for '-n'. Does anyone know > > the historical reason for omitting the file name when there's only on= e > > file to search? > >=20 >=20 > It removes a processing step to remove a prefix, > I guess. >=20 > This doesn't change that behavior -- it just makes > '-n' always prefix 'file:line' instead of just 'line'. Sure, by the way, I don't oppose the change, it makes sense to me. I was just curious because it seems like it should've been done long ago. Perhaps people have so far worried about breaking scripts.