sad icon indicating copy to clipboard operation
sad copied to clipboard

IO error `NotFound` when using `fzf`

Open fortes opened this issue 4 years ago • 3 comments

Thanks for this package, it's awesome!

I'm unable to use sad with the fzf preview window, I always get an error like so:

image

Here's what my env looks like for fzf:

~/dotfiles debian-buster *% [1]  env | rg fzf
FZF_COMPLETION_OPTS=-i
FZF_DEFAULT_COMMAND=bash -c "fdfind --type file --follow . \$(git rev-parse --show-cdup 2>/dev/null && echo --hidden)"
FZF_CTRL_T_COMMAND=fd_with_git --color always
FZF_CTRL_T_OPTS=--ansi --preview-window 'right:50%' --preview 'bat --color always --style=grid,changes --line-range :300 {}'
FZF_DEFAULT_OPTS=--height 60% --extended --bind ctrl-alt-a:select-all,ctrl-alt-d:deselect-all,F1:toggle-preview

fortes avatar Feb 01 '21 19:02 fortes

I think this is caused by fzf being in PATH, but not as /usr/bin/fzf

For instance, on my machine I have fzf in ~/.fzf/bin/fzf and I got the same bug. It was solved by installing fzf with yay.

dmerejkowsky avatar May 11 '21 17:05 dmerejkowsky

hummmm, interesting, I think this is an easy fix, will just have to use the which package instead of just doingfzf

https://github.com/ms-jpq/sad/blob/8f423fc71852bb2534564fc6de1d4a7ff2521451/src/fzf.rs#L41

this line seems to be the issue

its weird though, because some how fzf is found by which but not in the PATH. i guess it will be solved one way or another

ms-jpq avatar May 13 '21 08:05 ms-jpq

I think this is caused by fzf being in PATH, but not as /usr/bin/fzf

In my case, FZF is at /usr/bin/fzf and as you can see in the screenshot it gets launched -- the issue is that the preview window doesn't work

fortes-codaio avatar May 13 '21 13:05 fortes-codaio