i have ubuntu 14.04. and using ack-grep 2.12 to search for a text in files recursively inside a directory
I want to setup ack-grep options specific to the directory ~/workspace/project/ so that when i am at path ~/workspace/project and do ack 'mypattern' it search recursively in all child and grand-child directories,, and in all files recursively. and print the results. Further i have some child directories and also some grand child directories to ignore all files inside of them.
currently i am having a file .ackrc as ~/workspace/project/.ackrc
where i have written
--ignore-directory=is:node_modules/
--ignore-directory=is:public/bower_compoenents/
Now when i search ack-grep 'hello' it also searches in all the directories which i have instructed to IGNORE from .ackrc
Even using this pattern inside the .ackrc, it again searches in to be ignored directories. (PS : this works perfectly in the mac os x [EDIT : probably with an older version of ack])
--ignore-dir=node_modules/
--ignore-dir=public/bower_compoenents/
further none of these worked so far
--ignore-dir=public/bower_components
--ignore-dir=is:public/bower_components
Am i doing anything wrong?
EDIT : looking for resolution to ignore searching in nested directory. (i do not want to supply any special option while executing ack-grep on command line)
Quoting from the ack 2.12 manual:
So it looks like you would need to drop the slashes and the nested directories.
Are you sure this works on your other machine? What version of ack is on that machine?