Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: being able to ignore .ignore files, but not .gitignore #1138

Closed
JelteF opened this issue Dec 11, 2018 · 4 comments
Closed
Labels
question An issue that is lacking clarity on one or more points.

Comments

@JelteF
Copy link

JelteF commented Dec 11, 2018

What version of ripgrep are you using?

ripgrep 0.10.0
-SIMD -AVX (compiled)
+SIMD +AVX (runtime)

How did you install ripgrep?

pacman

What operating system are you using ripgrep on?

Arch linux

Describe your question, feature request, or bug.

I would like to have a flag that allows ignoring of .ignore files, but still ignore the files in .gitignore. The reason for me is that I have two main uses for rg.

  1. Searching files for content.
  2. Very quickly creating a list of all files in the current directory that I might want to open. I pass the output of rg --files --hidden --ignore-file ~/.vim/fzf_ignore to to FZF in vim. This allows me to fuzzy search all the file names in the current repo that are not ignored by git. ~/.vim/fzf_ignore contains a file with stuff like .git/ and .svn/.

The problem I keep running into is that I add some files to the .ignore file that I don't want to search. But then I also cannot open them with the fuzzy search anymore. The reason I add them to .ignore is because they are big files that will often match my search, such as csv files, a dev database dump or a vendored minified js file.

The addition of a --no-ignore-dot-ignore flag would solve this problem for me.

@BurntSushi
Copy link
Owner

I think that the various "no ignore" flags are already too complex. We might be doomed to support every possible combination, but I'd like to resist doing that for the time being. Meanwhile, would you consider using fd instead for listing files? fd is, after all, designed for listing files.

@BurntSushi BurntSushi added the question An issue that is lacking clarity on one or more points. label Dec 11, 2018
@JelteF
Copy link
Author

JelteF commented Dec 11, 2018

Yeah using fd would make sense indeed, but it has even less flags to change the behaviour. One other way that would work for me is to do make the following work:

rg --no-ignore --ignore-vcs

Right now it doesn't use the vcs ignores

@BurntSushi
Copy link
Owner

Master now has the --no-ignore-dot flag. It will be in the next release.

@JelteF
Copy link
Author

JelteF commented Jan 26, 2019

Awesome :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question An issue that is lacking clarity on one or more points.
Projects
None yet
Development

No branches or pull requests

2 participants