develooper Front page | perl.perl5.porters | Postings from January 2011

Re: ack is dead, long live ack (was: [perl.git] branch blead,updated. v5.13.8-167-gc1b879e)

Thread Previous
From:
H.Merijn Brand
Date:
January 6, 2011 09:18
Subject:
Re: ack is dead, long live ack (was: [perl.git] branch blead,updated. v5.13.8-167-gc1b879e)
Message ID:
20110106181812.4df8603c@pc09.procura.nl
On Thu, 6 Jan 2011 17:52:43 +0100, Aristotle Pagaltzis
<pagaltzis@gmx.de> wrote:

> * Craig A. Berry <craig.a.berry@gmail.com> [2011-01-06 17:30]:
> > So while ack may be, as its web site claims, "designed for
> > programmers with large trees of heterogeneous source code," it
> > doesn't look particularly well-equipped for anything quite as
> > heterogeneous as the Perl source tree, at least without using
> > -a all the time.
> 
> May I suggest a quick
> 
>     alias gg='git grep -E'

It is a huge shame that git-grep doesn't support -P :( :( :(

$ grep --help | grep -- -P
  -P, --perl-regexp         PATTERN is a Perl regular expression

> instead?
> 
> I loved ack in my Subversion days, but git-grep has displaced it
> for almost all uses I had for it. Because git-grep uses the list
> of tracked files to look for candidates, it does not have to rely
> on the crutch that is file type detection. What’s more, it’s far
> faster.
> 
> I miss ack’s grouped output layout, though.
> 
> (I also have this in my `.bashrc`:
> 
>     ggv() { git grep -l -E "$@" | xargs ${DISPLAY:+g}vim ; }
> 
> It takes a pattern and launches vim with all files containing
> matches for it.)

-- 
H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
using 5.00307 through 5.12 and porting perl5.13.x on HP-UX 10.20, 11.00,
11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.3 and AIX 5.2 and 5.3.
http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About