Find in Portfile

7 views
Skip to first unread message

Robinho

unread,
Apr 23, 2012, 5:05:24 PM4/23/12
to ack dev/users
Hi,

why the ack didn't make search in macport's Porfiles ?

Thanks

Andy Lester

unread,
Apr 23, 2012, 5:30:54 PM4/23/12
to ack-...@googlegroups.com

On Apr 23, 2012, at 4:05 PM, Robinho wrote:

why the ack didn't make search in macport's Porfiles ?

I don't understand the question that you're asking.

I will say that packaging for MacPorts is entirely separate from the development of ack itself.  Maybe someone who knows about the packaging process will be able to help.

xoa

Will Coleda

unread,
Apr 23, 2012, 5:43:49 PM4/23/12
to ack-...@googlegroups.com
I can give it a whirl.

> --
> You received this message because you are subscribed to the Google Groups
> "ack dev/users" group.
> To post to this group, send email to ack-...@googlegroups.com.
> To unsubscribe from this group, send email to
> ack-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/ack-users?hl=en.



--
Will "Coke" Coleda

Robson Roberto Souza Peixoto

unread,
Apr 25, 2012, 10:22:57 AM4/25/12
to ack-...@googlegroups.com
My english is so bad.

I had a directory's tree with a lot of Porfile files.

And I'd like to find a substring inner Portfiles, but the ack ignore this files.

How can I configure ack to find substring/regex into Porfiles?

thanks

Andy Lester

unread,
Apr 25, 2012, 10:32:14 AM4/25/12
to ack-...@googlegroups.com
I had a directory's tree with a lot of Porfile files.

And I'd like to find a substring inner Portfiles, but the ack ignore this files.

ack 1.x only searches source code, and source code is defined as "files that are of a type that ack understands."  Since ack doesn't know what type a Portfile is, it ignores it.  The workaround is to use the -a switch to search for any filetypes, even unrecognized ones.  Or you can use grep.

ack 2.0 will change this behavior by searching all text files by default.

xoa

Bill Ricker

unread,
Apr 25, 2012, 9:36:33 PM4/25/12
to ack-...@googlegroups.com
ack 1.x only searches source code, and source code is defined as "files that are of a type that ack understands."  

And more, ack 1.x  --type definition mechanism only works with files with a .ext marking, which is somewhat foreign in Mac-only tools.

However, you can search all ./{anywhere}/Portfile files with the flag

    -G REGEX              Only search files that match REGEX

like this
  ack -aG 'Portfile.*'  '\bmaintainers\s+nomaintainer\b'

or more readable as 
  ack -aG 'Portfile.*'  '(?x) \b maintainers \s+ nomaintainer \b'

(note that the  -a   'all' will still ignore .svn and similar directories ! )

--
Bill
@n1vux bill....@gmail.com
Reply all
Reply to author
Forward
0 new messages