Closed ssxwcz closed 3 years ago
Still the same problem, prompting the system can not find the specified path
Hi @kelleyma49, still facing the same issue with bat preview in locations other than home directory. My PsFzf version is 2.2.6.
These are the variables I've set:
FZF_CTRL_T_COMMAND rg --files -S -. -L -g "!{.git}"
FZF_CTRL_T_OPTS --preview "bat --color=always --line-range=:500 {}"
FZF_DEFAULT_OPTS --exact --no-sort --reverse --cycle
I think the issue is that the preview only seems to work if the full path is shown in the fzf list. This is unique to PsFzf. In bash, relative paths work fine with preview.
The issue was with working directory not getting set correctly. I have made a fix #86
After upgrading PSFzf to version 2.1.0, I found that I could not use bat for text preview. This is my fzf configuration.
When in the user directory, it can preview normally.
When entering a random directory, I can't use bat to preview, and the system can't find the specified file.