Skip to content

Commit

Permalink
[Search Directory] fix using wrong fd on Debian OSes
Browse files Browse the repository at this point in the history
Follow up to a bug and missing readme update in #282. #282 (comment)
  • Loading branch information
PatrickF1 committed Jan 21, 2023
1 parent ff3e9c5 commit 7b14fa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ First, install a proper version of these CLI dependencies:
| [fd][] | 8.5.0 | faster, colorized alternative to `find` |
| [bat][] | 0.16.0 | smarter `cat` with syntax highlighting |

[fd][] and [bat][] only need to be installed if you will use [Search Directory][]. If your package manager [doesn't install them as `fd` and `bat`](https://github.com/PatrickF1/fzf.fish/wiki/Troubleshooting#search-directory-does-not-work) respectively, then you can symlink them to those names.
[fd][] and [bat][] only need to be installed if you will use [Search Directory][].

Next, because `fzf.fish` is incompatible with other fzf plugins, [check for and remove these two common alternatives](https://github.com/PatrickF1/fzf.fish/wiki/Uninstalling-other-fzf-plugins).

Expand Down
5 changes: 3 additions & 2 deletions functions/_fzf_search_directory.fish
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths."
# Directly use fd binary to avoid output buffering delay caused by a fd alias, if any.
# Debian-based distros install fd as fdfind so also check for that. Fall back to "fd" for a clear error message.
set fd_cmd (command -v fd || command -v fdfind || echo "fd")
# Debian-based distros install fd as fdfind and the fd package is something else, so
# check for fdfind first. Fall back to "fd" for a clear error message.
set fd_cmd (command -v fdfind || command -v fd || echo "fd")
set --append fd_cmd --color=always $fzf_fd_opts

# $fzf_dir_opts is the deprecated version of $fzf_directory_opts
Expand Down

0 comments on commit 7b14fa7

Please sign in to comment.