9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Nicola Girardi <ng@0x80.stream>
To: 9front@9front.org
Subject: Re: [9front] grep: always show path with '-n'
Date: Thu, 03 Feb 2022 19:04:21 +0000	[thread overview]
Message-ID: <C131726DBF8DD60049249F4E7C302856@0x80.stream> (raw)
In-Reply-To: <7F801B6A7ACE8834CDC5DA9DB18BB1D6@eigenstate.org>

Quoth ori@eigenstate.org:
> Quoth Steve Simon <steve@quintile.net>:
> > the “traditional” way to achieve this is for g(1) to always pass
> > /dev/null to grep to ensure there are always multiple files.
> > 
> 
> 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.

I've always wondered about that behavior for '-n'.  Does anyone know
the historical reason for omitting the file name when there's only one
file to search?


  reply	other threads:[~2022-02-04  0:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 23:01 ori
2022-02-03  5:14 ` unobe
2022-02-03  7:04 ` Steve Simon
2022-02-03 16:47   ` ori
2022-02-03 19:04     ` Nicola Girardi [this message]
2022-02-04  0:47       ` ori
2022-02-04  0:48       ` ori
2022-02-04 22:00         ` Nicola Girardi
2022-02-05 16:57           ` hiro
2022-02-05 17:06             ` Stanley Lieber
2022-02-05 18:00               ` hiro
2022-02-04 12:39       ` Alex Musolino
2022-02-05  4:58 ` 有澤 健治

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=C131726DBF8DD60049249F4E7C302856@0x80.stream \
    --to=ng@0x80.stream \
    --cc=9front@9front.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;
as well as URLs for NNTP newsgroup(s).