Re: grep -r: add default "."

2022-09-05 Thread RVP
On Sun, 4 Sep 2022, Alistair Crooks wrote: agcre was not really meant to be a drop-in replacement for grep: - defaults to extended regexps - does most (sane/useful) perl extensions - does utf-8 searching and matching - is built around a vm style of matching, rather than a dfa, or aho corasick-s

Re: grep -r: add default "."

2022-09-04 Thread Alistair Crooks
On Sat, Sep 3, 2022 at 14:50 RVP wrote: > On Sat, 3 Sep 2022, Martin Husemann wrote: > > > How about fixing the bsd version we have in tree instead? Maybe FreeBSD > or > > OpenBSD already did that and we can borrwo? > > > > There is also the home-grown agcre in othersrc which looks (mostly) > fea

Re: grep -r: add default "."

2022-09-03 Thread RVP
On Sat, 3 Sep 2022, Martin Husemann wrote: How about fixing the bsd version we have in tree instead? Maybe FreeBSD or OpenBSD already did that and we can borrwo? There is also the home-grown agcre in othersrc which looks (mostly) feature-complete... -RVP

Re: grep -r: add default "."

2022-09-03 Thread Thomas Klausner
On Sat, Sep 03, 2022 at 01:51:57PM +0200, Martin Husemann wrote: > How about fixing the bsd version we have in tree instead? Maybe FreeBSD or > OpenBSD already did that and we can borrwo? At least OpenBSD has this behaviour. But I'm not volunteeering to evaluating what changes there are between o

Re: grep -r: add default "."

2022-09-03 Thread Thomas Klausner
On Sat, Sep 03, 2022 at 11:26:18AM +0200, Roland Illig wrote: > Am 03.09.2022 um 11:06 schrieb Thomas Klausner: > > On Fri, Sep 02, 2022 at 07:08:23PM +0200, Thomas Klausner wrote: > > > I'd like the change the behaviour to match what GNU grep does. > > > > Since I saw only positive feedback, here

Re: grep -r: add default "."

2022-09-03 Thread Martin Husemann
On Sat, Sep 03, 2022 at 11:26:18AM +0200, Roland Illig wrote: > What about importing the current GNU grep, instead of patching the 2004 > version of it? That has a bad license. How about fixing the bsd version we have in tree instead? Maybe FreeBSD or OpenBSD already did that and we can borrwo?

Re: grep -r: add default "."

2022-09-03 Thread Roland Illig
Am 03.09.2022 um 11:06 schrieb Thomas Klausner: On Fri, Sep 02, 2022 at 07:08:23PM +0200, Thomas Klausner wrote: I'd like the change the behaviour to match what GNU grep does. Since I saw only positive feedback, here's my proposed patch. Comments? The patch does not contain a test. The brac

Re: grep -r: add default "."

2022-09-03 Thread Thomas Klausner
On Fri, Sep 02, 2022 at 07:08:23PM +0200, Thomas Klausner wrote: > I'd like the change the behaviour to match what GNU grep does. Since I saw only positive feedback, here's my proposed patch. Comments? Cheers, Thomas ? bin/.gdbinit ? bin/grep ? bin/grep.html1 ? bin/grep.info Index: dist/doc/grep

Re: grep -r: add default "."

2022-09-02 Thread Simon Burge
Charlotte Koch wrote: > On Fri, 2 Sep 2022, Thomas Klausner wrote: > > > > > I often forget the "." at the end of my 'grep -r'. > > GNU grep automatically adds it, i.e.: > > > > # grep -r foo > > # > > > > is the same as > > > > # grep -r foo . > > # > > > > The grep we have in NetBSD recognizes t

Re: grep -r: add default "."

2022-09-02 Thread Charlotte Koch
On Fri, 2 Sep 2022, Thomas Klausner wrote: I often forget the "." at the end of my 'grep -r'. GNU grep automatically adds it, i.e.: # grep -r foo # is the same as # grep -r foo . # The grep we have in NetBSD recognizes that something is wrong, but is not that helpful: # grep -r foo grep: w

Re: grep -r: add default "."

2022-09-02 Thread RVP
On Fri, 2 Sep 2022, Thomas Klausner wrote: I'd like the change the behaviour to match what GNU grep does. Comments? FreeBSD's and OpenBSD's grep (both non-GNU) do the same thing, so it makes sense to harmonize NetBSD's (old GNU) grep -r behaviour too. -RVP

grep -r: add default "."

2022-09-02 Thread Thomas Klausner
Hi! I often forget the "." at the end of my 'grep -r'. GNU grep automatically adds it, i.e.: # grep -r foo # is the same as # grep -r foo . # The grep we have in NetBSD recognizes that something is wrong, but is not that helpful: # grep -r foo grep: warning: recursive search of stdin (stops h