-
-
Notifications
You must be signed in to change notification settings - Fork 815
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
Add the possibility to include ignored file but exclude files from .gitignore #1317
Comments
Does |
fd -H shows all hidden files, even if ignored by git. To elaborate, the behaviour I'd like to have:
From the shell, I can get such a list with To give a bit more context, the reason why I ask this of fd, is because it's used by fzf (by default) and in turn by I can workaround this for fzf and fzf-dependent tools in 2 ways:
Imho, it'd be nicer to have this behavior with a fd options, for instance a |
And |
Not really: tavianator@tachyon $ echo .foo > .gitignore
tavianator@tachyon $ touch .foo .bar
tavianator@tachyon $ fd -H
.bar
.gitignore
.git/
.git/... It prints The behaviour when explicitly negating things in |
I ended up putting Feel free to close this or let this open if my idea of a new option seems good to you. |
It sounds like what you really want is an option that means "show hidden files only if they are in a git repository". Because if you are in a git repository, hidden files that are ignored are likely significant. I would actually also find such an option useful, for similar reasons. I'm not sure what a good name for such an option would be. |
It would be nearly perfect, with the nuance that I don't care about hidden files that are not tracked by git. Actually the ideal solution is really the union of untracked, visible files (so default behavior of fd) plus every files known to git, hidden or not. I'd argue that could be the default, but it would be a breaking change... To stay on a backward compatible solution, maybe the option could be called |
My 2 cents: this is a very specific usage case, so I don't think it suits well the general purpose of I see You care about the untracked that's unhidden, but not the untracked that's hidden, that's odd, or at least I've never seen this pattern before, I'd expect such granularity from a custom script that pipes output to filtering tools (cool little project idea). |
I care about the unhidden untracked, because they are not hidden. I don't think it's odd. And it's also what fd does by default already. This issue is about the tracked starting with |
I know what the issue is about. What you want:
I just said it's odd that you want 2 but not 4, in other words, I've never seen this pattern before, anywhere. |
Why is that odd? Consider a repo where you want to see things like:
but you don't want to see things like:
The first list has code and configuration I care about, and may want to change. The latter are things that I usually don't care about, and are usually generated by something else. |
(Did you close this by accident?)
That is solved by The files But
|
Ah yes. Good point, I was including gitignored files in "untracked" category. So I don't really have a usecase for this either besides.git |
Including
From my POV this can probably be closed and I'll use |
Use case: in my repository, I have a
.git
folder (ignored by default by fd) and also some config files tracked by git, for instance.gitlab-ci.yml
and.gitignore
.I'd like to have a way to include this last file, even though it's technically hidden.
As a workaround, I'm adding:
etc in my .gitignore for each file I want to get.
The text was updated successfully, but these errors were encountered: