sack

domm on 2009-12-19T00:01:54

After typing ack 'sub foo' lib for the approximately thousandth time during some refactoring sessions, I couldn't be bothered anymore and added the following snippet to my realias (after some googling on how to get params into an alias, which does not work in bash, so I had to solve it via a bash function):

sack () {
   ack "sub $1" lib
}

To find a given method in some of our labyrinthine code, I now say

~/projects/Foo-Bar$ sack annoying_method
and get a list of all occurrences.

yay!

P.S.: The name sack has nothing do with subroutine ack, but of course comes from the Austrian saying "Gemma ned am sack, oida!"


yesss!

maettu on 2009-12-20T09:17:54

"Gemma ned am sack, oida!"
Läng mer's Gwehr! (Swiss German saying)