-
-
Notifications
You must be signed in to change notification settings - Fork 776
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
Show/search hidden files by default (or not)? #18
Comments
From my point of view, there are fundamentally 2 different routes to take here. Either "fd" is targeted as a system tool (like "find"), or it is targeted as an end-user utility. Think of the "plumbing/porcelain" split i git. User tools can have config files, but system tools absolutely cannot. If this is going to be used in scripts, in automation, etc, the behavior has to be completely determined from the command line arguments. Users can still set options via aliases, but I agree that this is less ergonomic than a config file. It's also possible to make a heuristic for determining when to use the config file (say, when the tool is run interactively), but I'm afraid this is too confusing and subtle. So, if we discuss "fd" as a user tool, it can have all the fancy bells and whistles. Strictly personally, I would love a neater alternative to interactive uses of "find", but I absolutely need to trust that my file finder doesn't hide files from me. For example, a reasonable default could be collapse-vcs, which would turn this:
Into this:
Or some other syntax - but I'm not very fond of hiding files completely by default. |
Thank you for the feedback!
I definitely see fd in the end-user utility corner. It is meant as a "neater alternative to interactive uses of find", as you wrote below.
Yes, good points. Maybe, even if fd is not primarily meant as a system tool, we should try to avoid a config file at first. Aliases are not that bad and it's easy to reset them (
I also believe this would be confusing.
I'm not sure... I believe I have to disagree here. Hidden files are typically hidden for a good reason: because you usually do not want to care about them.
That's a neat idea, but sometimes I might want to pipe the output of |
I've thought a bit about it, and I mostly agree. I find myself needing to be sure I see 100% of the available files quite often, so I'll keep using I think It would be great if the status line could give a condensed breakdown of files found, links followed, dirs read, etc. It'd be very useful for getting the "vitals" of a search operation. |
That's a very neat idea! I'll look into this when I'm back home. Thanks!
|
I have re-considered this. Adding such a status line would always mean that we have to traverse all hidden paths and all ignored paths (and their children, ..), which can lead to huge performance downsides. I'm closing this for now, but I'm still open to suggestions. Thank you for the feedback! |
Sorry, but I am expecting |
@ChengCat If you see a potential problem with the current situation, please feel free to open a new ticket. In my view, there is no reason not to use |
Possible options are [updated on 2017-06-05]:
--hidden
(-h
is for--help
...)=> Done already,
-H
can be used (alongside--hidden
) for searching hidden directories.~/.config/fdrc
) where defaults (such assearch_hidden=true
) can be set=> As discussed below, this will not be implemented for now. Aliases (such as
alias fd="fd -HI"
).The text was updated successfully, but these errors were encountered: