Patch to search files without an extension

69 views
Skip to first unread message

Andy Lester

unread,
Mar 7, 2012, 11:43:14 AM3/7/12
to ack-...@googlegroups.com
I really don't want to modify ack's behavior on file searching any more in ack 1.x, but this patch looks like it might be able to handle files without an extension without causing any weird behavior elsewhere.

Thoughts?  Would this be useful to you?

xoa

Begin forwarded message:

Subject: [ack] Files without an extension (#213)
Date: March 7, 2012 10:26:21 AM CST
To: Andy Lester <an...@petdance.com>

Allow files without an extension to be recognized as a distinct type. Keep old behavior unless --type-allow-empty is explicitly specified to ensure backwards-compatibility. Added tests and help text for this change.

You can merge this Pull Request by running:

 git pull https://github.com/willert/ack master

Or you can view, comment on it, or merge it online at:

 https://github.com/petdance/ack/pull/213

-- Commit Summary --

* Allow files without an extension to be recognized as a distinct type. Keep old behavior unless --type-allow-empty is explicitly specified. Added tests and help text for this change.

-- File Changes --

M Ack.pm (15)
M ack (15)
M t/ack-text.t (1)
M t/ack-type.t (20)
A t/swamp/no-extension (1)

-- Patch Links --

 https://github.com/petdance/ack/pull/213.patch
 https://github.com/petdance/ack/pull/213.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/petdance/ack/pull/213



Tom Burger

unread,
Mar 7, 2012, 12:15:56 PM3/7/12
to ack-...@googlegroups.com
I would use it.  I can't always guarantee what file extensions (or lack thereof) I'm searching for.

-Tom

--
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.

Bill Ricker

unread,
Mar 7, 2012, 8:57:17 PM3/7/12
to ack-...@googlegroups.com
Looks plausible, minimal, and useful. And comes with tests.
+1

bill.

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

Fisc McTang

unread,
Apr 7, 2012, 12:55:26 PM4/7/12
to ack-...@googlegroups.com
On Wednesday, March 7, 2012 8:43:14 AM UTC-8, Andy Lester wrote:
Thoughts?  Would this be useful to you?

Yes, very useful. 

suan

unread,
May 4, 2012, 2:13:05 PM5/4/12
to ack-...@googlegroups.com
++1. In fact I have a use for it at this very moment.


- Suan


On Wednesday, March 7, 2012 10:43:14 AM UTC-6, Andy Lester wrote:
I really don't want to modify ack's behavior on file searching any more in ack 1.x, but this patch looks like it might be able to handle files without an extension without causing any weird behavior elsewhere.

Thoughts?  Would this be useful to you?

xoa

Begin forwarded message:

On Wednesday, March 7, 2012 10:43:14 AM UTC-6, Andy Lester wrote:
I really don't want to modify ack's behavior on file searching any more in ack 1.x, but this patch looks like it might be able to handle files without an extension without causing any weird behavior elsewhere.

Thoughts?  Would this be useful to you?

xoa

Begin forwarded message:

Michael Mitchell

unread,
Mar 20, 2013, 1:40:58 PM3/20/13
to ack-...@googlegroups.com
This would be useful to me. I want ack to search my Gemfiles in my rails projects.

-mj
Reply all
Reply to author
Forward
0 new messages