> Date: Sun, 17 Jul 2011 15:19:21 -0400
> From: Ted Unangst <t...@tedunangst.com>
> 
> On Sun, Jul 17, 2011, Jason McIntyre wrote:
> > On Sun, Jul 17, 2011 at 11:43:03AM -0400, Ted Unangst wrote:
> >> I recently learned that our grep does not support the \<\> syntax for
> >> word boundaries, only the somewhat more difficult to use [[:<:]] format.
> >> It's fairly easy to convert one to the other however.
> >>
> > 
> > if you do this, we will need to think carefully about how to document
> > it. grep(1) itself does not discuss REs, and instead points to
> > re_format(7). but you are proposing an extension to grep only.
> > 
> > can i ask why you want to support this? it is a gnu grep thing or
> > something?
> 
> It is supported (and documented) by GNU grep.  I'm not proposing
> documenting it per se, it's simply something that will work if you use
> it, but the documented regex format remains the supported way.

We should not just add GNU extensions to our userland, especially if a
proper portable alternative exists.

> There is at least one port (libpqxx) that expects this syntax to work
> and doesn't check that it doesn't.  It just runs the command.  I suspect
> other such scripts exist.

That's not a good enough reason.  People write all sorts of unportable
scripts on Linux.  We should add stuff like this only if specified by
a standard we care about, or if it's supported on the majority of
UNIX-ike operating systems.

Reply via email to