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] make fd configurable, exclude hidden files by default #126

Merged
merged 10 commits into from
Feb 16, 2021

Conversation

PatrickF1
Copy link
Owner

@PatrickF1 PatrickF1 commented Feb 15, 2021

Making fd configurable has been a long time ask and I'm finally giving in (e.g. #107, #112, and many other issues). It makes sense because fd has a wealth of useful options and I can see how others may want to play around with them to fit their use case.

I also have decided to exclude hidden files by default. This is a backwards break change but I doubt many people will notice. It was only ever useful for me to search my own dotfiles repo, and much of the feedback I got was asking to NOT search hidden files by default. I also made this change because it makes the new configuration code much simpler to implement.

@@ -3,7 +3,7 @@ function __fzf_search_current_dir --description "Search the current directory. R
# See similar comment in __fzf_search_shell_variables.fish.
set --local --export SHELL (command --search fish)

set fd_arguments --hidden --color=always --exclude=.git
set fd_opts --color=always $fzf_fd_opts
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed the variable because we are using opts everywhere else, e.g. FZF_DEFAULT_OPTS

if test -d functions
@test "doesn't change fd's base directory if no slash on current token" -z (string match --entire -- "--base-directory" $fd_args)
test -n "$fd_captured_opts" && test -z (string match --entire -- "--base-directory" $fd_captured_opts)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope: this test wasn't failing even when the code wasn't working.

@PatrickF1 PatrickF1 merged commit bada3e6 into main Feb 16, 2021
@PatrickF1 PatrickF1 deleted the configure-fd branch February 16, 2021 04:09
hrshtst pushed a commit to hrshtst/fzf.fish that referenced this pull request Apr 22, 2021
…atrickF1#126)

Making fd configurable has been a long time ask and I'm finally giving in (e.g. PatrickF1#107, PatrickF1#112, and many other issues). It makes sense because fd has a wealth of useful options and I can see how others may want to play around with them to fit their use case.

I also have decided to exclude hidden files by default. This is a backwards break change but I doubt many people will notice. It was only ever useful for me to search my own dotfiles repo, and much of the feedback I got was asking to NOT search hidden files by default. I also made this change because it makes the new configuration code much simpler to implement.
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.

1 participant