Open brechtm opened 3 years ago
I finally got find-directory to work with the following settings:
$fzf_find_command = "bash -c \"set -o pipefail; command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune -o -type f -print -o -type l -print 2> /dev/null | cut -b3-\""
$fzf_find_dirs_command = "bash -c \"set -o pipefail; command find -L . -mindepth 1 \\( -path '*/\\.*' -o -fstype 'sysfs' -o -fstype 'devfs' -o -fstype 'devtmpfs' -o -fstype 'proc' \\) -prune -o -type d -print -o -type d -print 2> /dev/null | cut -b3-\""
Unfortunately, it's just as slow as when using fd. It turns out just setting the FZF_DEFAULT_COMMAND causes the slowdown.
There is no such delay when running fzf in bash with FZF_DEFAULT_COMMAND set. I suspect xonsh's startup time is to blame, similar to what is described in this fzf issue.
To make find-directory do something different from find-file, one needs to set
$fzf_find_dirs_command
.However, setting it to
fd -t d
(as suggested in the README) is noticably slower. This also goes for$fzf_find_command = "fd"
. I haven't yet been able to figure out whichfind
command produces similar output tofd -t d
, unfortunately.