Does --ignore-dir support wildcards?

87 views
Skip to first unread message

Yagamy Light

unread,
Jul 2, 2020, 9:57:13 AM7/2/20
to ack users
I just found out my alias `ack --ignore-dir=".*" …` doesn't work, ack still descends to directories starting with dot.

Documentation for this option consists of just one sentence "Add/remove directory from list of ignored dirs", so I'm wondering how to make it work? I also tried `--ignore-dir="\..*"` in case it supports regex, to no avail though.

Andy Lester

unread,
Jul 4, 2020, 10:21:02 PM7/4/20
to ack-...@googlegroups.com


> On Jul 2, 2020, at 8:57 AM, Yagamy Light <hiang...@gmail.com> wrote:
>
> I just found out my alias `ack --ignore-dir=".*" …` doesn't work, ack still descends to directories starting with dot.
>
> Documentation for this option consists of just one sentence "Add/remove directory from list of ignored dirs", so I'm wondering how to make it work? I also tried `--ignore-dir="\..*"` in case it supports regex, to no avail though.

You're close.

It would be --ignore-dir=match:^\.



Yagamy Light

unread,
Aug 11, 2020, 8:24:17 AM8/11/20
to ack users
Thank you very much! Sorry I didn't reply, your suggestion works for me. For side readers I should note, I had to quote the option, otherwise the shell seem to have been expanding silently something in it, so it didn't work.
Reply all
Reply to author
Forward
0 new messages