beyondgrep / ack2

**ack 2 is no longer being maintained. ack 3 is the latest version.**
https://github.com/beyondgrep/ack3/
Other
1.48k stars 138 forks source link

ack ignores a folder #537

Closed davidhq closed 9 years ago

davidhq commented 9 years ago

Hi, I have some problems in ack 2.14:

david@eclipse:~/Projects/booktical (master)$ ack "Database configuration specifies nonexistent driver"
david@eclipse:~/Projects/booktical (master)$ ack "nonexistent driver"
david@eclipse:~/Projects/booktical (master)$ ack --js "nonexistent driver"
david@eclipse:~/Projects/booktical (master)$ ack "nonexistent"
david@eclipse:~/Projects/booktical (master)$ cd node_modules
david@eclipse:~/Projects/booktical/node_modules (master)$ ack "nonexistent"
active_record/lib/error.js
36: this.message = "Database configuration specifies nonexistent driver: '"+ driver +"'";

Any explanation for this? I don't have node_modules ignored:

--type-add
ruby=.builder,.feature
--type-set
rackup=.ru
--type-set
haml=.haml
--type-add
php=.phtml
--type-set
jsx=.jsx
--type-set
markdown=.markdown,.md,.mdown
--type-set=cache=.cache
--ignore-dir=.idea
--ignore-dir=tmp
--ignore-dir=photos
--nocache
--nocss
hoelzro commented 9 years ago

@davidhq If you look at the output of ack --dump, you'll notice that node_modules is ignored by default.

davidhq commented 9 years ago

Aha ok, thank you.. this is probably a good default, yes...

Can I somehow override this from the command line when I need to do it?

hoelzro commented 9 years ago

Yes! You can use --noignore-dir=node_modules. If you're curious about other ways to use ignore, you can find out about it in ack --man.

davidhq commented 9 years ago

Thank you for these tips!

hoelzro commented 9 years ago

You're very welcome!

hoelzro commented 9 years ago

I'm going to close this as a duplicate of #524