Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PR] vcs_info-examples: optimize +vi-git-untracked() #76



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




Messages sorted by: Reverse Date, Date, Thread, Author