I have certain CSS files of fileName *-c.css and *-gen.css which I want to ignore from ack-grep searches.
I see that --type-set=TYPENAME=.extension does not accept regex filters like *-c.css, any idea of how to get around this problem ?
I have certain CSS files of fileName *-c.css and *-gen.css which I want to ignore from ack-grep searches.
I see that --type-set=TYPENAME=.extension does not accept regex filters like *-c.css, any idea of how to get around this problem ?
I came across ack-grep 2.0 which provides --ignore-file option based on regex pattern as below and it worked after adding it to ~/.ackrc.
--ignore-file=match:-c.js
--ignore-file=match:-gen.js
--ignore-file=match:-c.css
--ignore-file=match:-gen.css
Use a regular expression to filter those files you want to search.
ack -G '(?<!-c)(?<!-gen)\.css$' expression_to_search
It uses the perl
flavour. I do a negative look-behind to skip those that contain -c
or -gen
just before the extension.
-G
option. You have to use ack -g pattern | ack -x expression_to_search
. –
Elissaelita © 2022 - 2024 — McMap. All rights reserved.
--ignore-file=is:<filename>
- for ctags file:--ignore-file=is:tags
– Councilwoman