argument to force search of *.inc files

18 views
Skip to first unread message

Chris VandenHeuvel

unread,
Dec 30, 2011, 3:03:43 PM12/30/11
to ack dev/users
Here's my current .ackrc:

--nosql
--type-add
php=es.inc

because the files I want to search take the form "common.es.inc" ...
as language files, they may also be named "common.en.inc" etc.

3 questions:

1. Do I have something wrong in my ackrc? It doesn't give errors, but
it's still not searching my files properly. If I add a location
parameter with a * on the end to search all files, then it sees them.

2. Would ack recognize something like php=*.inc?

3. If I used -a and then arguments like --nosql, would it make ack
switch from a whitelist to a blacklist?

Andy Lester

unread,
Dec 30, 2011, 6:44:33 PM12/30/11
to ack-...@googlegroups.com
>
> --type-add
> php=es.inc

You can't do "es.inc" in ack 1.x. ack 2.x will be much more flexible.

> 2. Would ack recognize something like php=*.inc?

No.

> 3. If I used -a and then arguments like --nosql, would it make ack
> switch from a whitelist to a blacklist?

Yes, except that I'm pretty sure -a makes all file type checking stop.

xoxo,
Andy


--
Andy Lester => an...@petdance.com => www.petdance.com => AIM:petdance

Bill Ricker

unread,
Dec 30, 2011, 11:55:00 PM12/30/11
to ack-...@googlegroups.com
On Fri, Dec 30, 2011 at 6:44 PM, Andy Lester <an...@petdance.com> wrote:
Yes, except that I'm pretty sure -a makes all file type checking stop.

Tested and Confirmed

$ ack -a --nohtml -il 'john butler' 
lists html files.


--
Bill
@n1vux bill....@gmail.com

Andy Lester

unread,
Dec 31, 2011, 1:22:21 AM12/31/11
to ack-...@googlegroups.com

On Dec 30, 2011, at 10:55 PM, Bill Ricker wrote:

Tested and Confirmed

$ ack -a --nohtml -il 'john butler' 
lists html files.

The way to test that without actually searching is to use the -f flag.  The -f was originally a debugging tool for me to see what files would get searched, and I figured "Hey, this is actually useful."

Bill Ricker

unread,
Dec 31, 2011, 1:33:33 AM12/31/11
to ack-...@googlegroups.com
On Sat, Dec 31, 2011 at 1:22 AM, Andy Lester <an...@petdance.com> wrote:
The way to test that without actually searching is to use the -f flag.  The -f was originally a debugging tool for me to see what files would get searched, and I figured "Hey, this is actually useful."

Yeah. But I was ack'ing for Butler at that time anyway, so I knew what the right answers were. And thus they were in cache. 

--
Bill
@n1vux bill....@gmail.com

Shlomi Fish

unread,
Dec 31, 2011, 3:53:50 AM12/31/11
to ack-...@googlegroups.com, an...@petdance.com
Hi Andy,

On Fri, 30 Dec 2011 17:44:33 -0600
Andy Lester <an...@petdance.com> wrote:

> >
> > --type-add
> > php=es.inc
>
> You can't do "es.inc" in ack 1.x. ack 2.x will be much more flexible.
>

I noticed that a great deal of the questions posted here are being answered
with "it *will* be fixed in Ack 2.x" (i.e: sometime in the future). In the
meantime, we are stuck helpless with only Ack 1.x, and while the Ack 2.x beta
only supports a very small subset of its flags and functionality and is quite
unusable.

I recall that Ack 2.x has been under development for many months now -
possibly about two years. Why does it take so long? Wouldn't an adaptation of
the existing Ack 1.x have taken much less time than that? If you think a
complete rewrite was in order, then it must have been justified by a faster
development time, which doesn't appear to be the case.

I would have contributed to Ack, but I'm unhappy with some of the design
decisions in its code, such as the deliberately procedural and non-OOP
interface, which are not going to be addressed in Ack 2.

Regards,

Shlomi Fish

> > 2. Would ack recognize something like php=*.inc?
>
> No.
>
> > 3. If I used -a and then arguments like --nosql, would it make ack
> > switch from a whitelist to a blacklist?
>
> Yes, except that I'm pretty sure -a makes all file type checking stop.
>
> xoxo,
> Andy
>
>
> --
> Andy Lester => an...@petdance.com => www.petdance.com => AIM:petdance
>

--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
"Star Trek: We, the Living Dead" - http://shlom.in/st-wtld

Chuck Norris can make the statement “This statement is false.” a true one.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Reply all
Reply to author
Forward
0 new messages