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

[Search files] include hidden files if current token has a leading dot #147

Closed
wants to merge 1 commit into from

Conversation

kidonng
Copy link
Contributor

@kidonng kidonng commented Mar 30, 2021

While it makes sense to exclude hidden files by default in #126, it actually makes the function less accessible.
Hidden files are actually being searched for quite frequently, but keeping --hidden in fzf_fd_opts makes the changes meaningless. Something like bind \e\cf "fzf_fd_opts=--hidden __fzf_search_current_dir" isn't intuitive as well.

What if we include hidden files if current token has a leading dot?

  • This is the same logic behind if the current token is a directory with a trailing slash, then search will be scoped to that directory
  • This can been seen in other places, for example Alfred, which only shows hidden files if you first type a dot.

I will add test for this if you like the idea.

P.S. I know you are trying to avoid introducing more complexity to search files, and honestly I don't feel like it too. That's why this PR is not adding new features (like prepending ./) but providing sensible search defaults.

@PatrickF1
Copy link
Owner

From a product perspective, I think this feature has value and isn't too confusing to use. But sorry I'm going to put my foot down on this. I'm done adding things to the search directory feature. It's a real nightmare to test and maintain and I am not passionate about the feature itself.

@PatrickF1
Copy link
Owner

Ok I'm sorry for being a downer. I'm going to close this for now but you are free to reopen or keep discussing with me to change my mind. In case you haven't noticed, I don't like a lot of things and eventually I change my mind after some persuasion.

@PatrickF1 PatrickF1 closed this Apr 2, 2021
@kidonng
Copy link
Contributor Author

kidonng commented May 12, 2021

Coming back to this PR later and I realized searching for hidden files is rarely needed (usually you already know its name), plus now I have a keybinding for searching hidden files using fzf_fd_opts.

@PatrickF1
Copy link
Owner

Great to hear fzf_fd_opts works for this use case!

@kidonng
Copy link
Contributor Author

kidonng commented May 13, 2021

🤷 It's funny to see how my past self feel against this usage

@PatrickF1
Copy link
Owner

Our workflows are always changing :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants