From: Frank Terbeck <ft@zsh.org>
To: Oliver Kiddle <opk@zsh.org>
Cc: "Suraj N. Kurapati" <sunaku@riseup.net>, zsh-workers@zsh.org
Subject: Re: [PR] vcs_info-examples: optimize +vi-git-untracked() #76
Date: Sun, 27 Jun 2021 12:04:56 +0200 [thread overview]
Message-ID: <87y2avr5br.fsf@ft.bewatermyfriend.org> (raw)
In-Reply-To: <96030-1624785233.702771@PUMF.Qbc8.FJES> (Oliver Kiddle's message of "Sun, 27 Jun 2021 11:13:53 +0200")
Oliver Kiddle wrote:
> "Suraj N. Kurapati" wrote:
[…]
>> Speed up the prompt on large and/or deep working directories by
>> stopping grep(1) as soon as it finds a single match, with `-q`.
>
> The -q option to grep isn't strictly portable. It is certainly lacking
> on Solaris. It is more reliable with egrep but that may not be faster.
> It does seem to be there on Linux and the main BSDs so I don't know
> whether we should still care about this.
I think having this in an example is fine. We're using "grep -q" in
other places, too. Not that it matters much, but ‘-q’ is part of SUSv3.
Maybe vendors should be asked to implement it therefore. :)
In any case, I think its use in examples of documentation is fine. If
you're plagued with an implementation that doesn't implement -q, you get
to work around it.
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
next prev parent reply other threads:[~2021-06-27 10:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 6:09 Suraj N. Kurapati
2021-06-27 9:13 ` Oliver Kiddle
2021-06-27 10:04 ` Frank Terbeck [this message]
2021-06-28 17:16 ` Suraj N. Kurapati
2021-06-27 13:03 ` Roman Perepelitsa
2021-06-28 22:57 ` Suraj N. Kurapati
2021-06-29 7:16 ` Roman Perepelitsa
2021-08-04 8:55 ` Roman Neuhauser
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=87y2avr5br.fsf@ft.bewatermyfriend.org \
--to=ft@zsh.org \
--cc=opk@zsh.org \
--cc=sunaku@riseup.net \
--cc=zsh-workers@zsh.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
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).