Features for ack2

34 views
Skip to first unread message

Rob Hoelz

unread,
Apr 24, 2012, 7:36:12 AM4/24/12
to ack-...@googlegroups.com
Hello everyone,

Until now, I've been using ack2's issue tracker on Github as a dumping ground for ideas I've had, usually asking for Andy's thoughts.  I decided today that I'd like some community feedback as well, so I'm going to
try to post my ideas here first to be evaluated.  So here's some ideas I've had for ack2; let me know what you all think!

  • Should specifying ack -g -i PATTERN make PATTERN case-insensitive?  What about --smart-case?
  • Andy mentioned that a --files-from feature would be nice; this would allow you specify a list of files to search in another file.  I was thinking that we should allow filters to be applied to this list of files; see https://github.com/petdance/ack2/issues/34 for an example of how I would use this.
  • In order to ease deployment, I was thinking it might not be a bad idea to allow a user building ack him/herself to "bake" the default ackrc into the final script.  This would help when shipping ack to many machines.

Please let me know if you think these ideas are good, or bad, or if they make you think of good ideas of your own!

Thanks,

Rob

Rob Hoelz

unread,
Apr 26, 2012, 6:21:48 AM4/26/12
to ack-...@googlegroups.com
Another idea:  I think it might be nice to allow --passthru to throw a bell character into the match.  Let's say I'm tailing a log file, and I want to highlight the string "Job's done":

    tail -f /var/log/warcraft/peasant.log | ack --passthru --color "Job's Done"

If I expect that job to take a while, I may only check it every few minutes.  However, if ack had the ability to throw a bell character into the match coloration, I would hear a bell every time that pattern is matched, and I would know to check that log file again.

Andy Lester

unread,
Apr 26, 2012, 8:43:59 AM4/26/12
to ack-...@googlegroups.com

On Apr 26, 2012, at 5:21 AM, Rob Hoelz wrote:

Another idea:  I think it might be nice to allow --passthru to throw a bell character into the match.  Let's say I'm tailing a log file, and I want to highlight the string "Job's done":

    tail -f /var/log/warcraft/peasant.log | ack --passthru --color "Job's Done"

Maybe in ack 2.  No way I want to add something like that in ack 1.

Part of the problem here with adding features to ack 1 is that we have to recode them in ack 2 as well. 

xoa


Rob Hoelz

unread,
Apr 26, 2012, 9:00:32 AM4/26/12
to ack-...@googlegroups.com
That's fine with me; that's kind of why I called this thread "Features
for ack2" =)
> --
> 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.
>

Andy Lester

unread,
Apr 26, 2012, 9:40:49 AM4/26/12
to ack-...@googlegroups.com

On Apr 26, 2012, at 8:00 AM, Rob Hoelz wrote:

That's fine with me; that's kind of why I called this thread "Features
for ack2" =)

Agh. Sorry, my bad. :-(

That bell thing I think might make sense.  All these should be put into the ack2 queue.
Reply all
Reply to author
Forward
0 new messages