Including some hidden files and directories in the search #2011
-
Generally, how do prevent ripgrep from skipping a specific set of (hidden) files and directories (starting with a dot), in my case Alternatively, how do I make ripgrep ignore only a certain of files and directories such VCS directories and file patterns registered in .gitignore. I'm not certain which filtering technique that is the most compact to express. I tried rg --hidden --iglob '.git' ... because I never (seldom) want to search .git directories but that also ignores the .gitlab-ci.yml file. I've scanned through the docs but couldn't find a flag that suited my needs. I'm missing a flag rg --hidden --iglob-regex '^.git$' ... or alternatively rg --glob-regex '^.gitlab-ci.yml$' ... And rg --glob '.gitlab-ci.yml' ... is not usable to me as it skips other files. I simply want the default behavior of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Can you just add |
Beta Was this translation helpful? Give feedback.
Can you just add
!.gitlab-ci.yml
to a.ignore
file? That should whitelist it and include it in your searches for the directory in which the.ignore
file resides.