Skip to content

Fix inclusion of excluded file types#393

Open
dmitrivereshchagin wants to merge 2 commits into
beyondgrep:devfrom
dmitrivereshchagin:notype-type
Open

Fix inclusion of excluded file types#393
dmitrivereshchagin wants to merge 2 commits into
beyondgrep:devfrom
dmitrivereshchagin:notype-type

Conversation

@dmitrivereshchagin
Copy link
Copy Markdown
Contributor

It may be convenient to exclude a file type from the .ackrc file. However, file types defined with the --type-set option and file types with multiple filters cannot be re-enabled from the command line.

@n1vux
Copy link
Copy Markdown
Contributor

n1vux commented May 27, 2026

Thank you for including a test, and fixing a XXX FixMe.

Test passes, change looks reasonable.

The anticipated, general solution to a project or home-dir .ackrc sometimes being overkill / doing the wrong thing for a current desire is to use the --noenv option to ignore both .ackrc and $ACK_VARIABLES_IN_ENV, falling back to defaults, and then you can use --type theOneIgnoredInAckrc.

(Alternatively, you can comment out that line in .ackrc for an hour with a leading # and then un-comment it when done. I'd leave the editor open to remind me to undo it!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants