sad
sad copied to clipboard
IO error `NotFound` when using `fzf`
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:

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
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.
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
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