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

directory name with underscore will ignored #535

Closed mihenkii closed 9 years ago

mihenkii commented 9 years ago

centos5.10 x86_64
[root@localhost myapp]# ack --version ack 2.14 Running under Perl 5.8.8 at /usr/bin/perl

Copyright 2005-2014 Andy Lester.

subdirectory is node_modules, there are some js files in node_modelues/express/, ack doesn't find them out. then I rename node_modules to node , ack works well.

[root@localhost myapp]# ls index.js node_modules package.json [root@localhost myapp]# ack --js -R express index.js 1:var express = require('express') 2:var app = express(); [root@localhost myapp]#

[root@localhost myapp]# ack --js -R express node_modules/express/index.js module.exports = require('./lib/express'); [root@localhost myapp]#

[root@localhost myapp]# ack --js -R express index.js 1:var express = require('express') 2:var app = express();

node/express/index.js 2:module.exports = require('./lib/express');

node/express/lib/request.js 6:var deprecate = require('depd')('express');

node/express/lib/router/index.js 10:var debug = require('debug')('express:router'); 11:var deprecate = require('depd')('express');

node/express/lib/router/layer.js 6:var debug = require('debug')('express:router:layer');

petdance commented 9 years ago

It's not the underscore. The node_modules directory is ignored. It's one of ack's default rules.

Run ack --dump and you'll see.

mihenkii commented 9 years ago

hi, petdance thanks.