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

Ability to disable one or more .gitignore files without having to use --no-ignore-vcs #1558

Closed
j-lakeman opened this issue May 8, 2024 · 6 comments

Comments

@j-lakeman
Copy link

j-lakeman commented May 8, 2024

Would be quite handy to be able to ignore the content of selectable .gitignore files. Maybe by listing them in the .fdignore, for example: path_to/.gitignore
I came across this issue after integrating fd deeper into my workflows e.g. in combination with fzf.

Nevertheless great application!

@tmccombs
Copy link
Collaborator

tmccombs commented May 8, 2024

Not sure if it helps your use case, but you could do the other way around, and use --no-ignore-vcs, then specify specific .gitignore files to use with --ignore-file

@j-lakeman
Copy link
Author

Cheers for the support!
Thing is in my case I only want to exclude a single .gitignore, but keep the individual ones in subfolders and the global git as well as fd one while also having hidden files enabled.

So what I'm doing atm as a workaround is calling fd --hidden --no-ignore-vcs.
I have also tried fd -u --ignore-file .config/fd/ignore.

But with both approaches, I would need to re-enable dozens of .gitignore files buried somewhere in the file system. Hope this helps to clarify!

@tmccombs
Copy link
Collaborator

I see.

That seems like a somewhat unusual use case to me, so I'm not sure it would be worth adding that functionality.

@j-lakeman
Copy link
Author

Fair enough.
Is it doable to implement a fdrc like ripgrep does (https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file) instead? That way I could work around my issue and a lot of other possible use cases other folks might have could be covered.

@tmccombs
Copy link
Collaborator

tmccombs commented May 21, 2024

See #362

As a current workaround you can use an alias, or a wrapper script

@j-lakeman
Copy link
Author

Cheers!
Closing in favour of #362

@j-lakeman j-lakeman closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants