junegunn / fzf.vim

fzf :heart: vim
MIT License
9.6k stars 583 forks source link

Preview fails in nvim Windows with shell=pwsh #1307

Open orangecrust opened 3 years ago

orangecrust commented 3 years ago

Line 41 works and the preview shows up fine on windows 10 if shell=cmd, but the syntax is incorrect if using powershell: https://github.com/junegunn/fzf.vim/blob/e34f6c129d39b90db44df1107c8b7dfacfd18946/autoload/fzf/vim.vim#L39-L45

Somewhat related to this comment: https://github.com/junegunn/fzf.vim/issues/1242#issuecomment-801935970

I'm not really familiar with the purpose of that line or how this would be handled gracefully. fwiw though I can get by personally by just removing line 41.

Not related, but I do have git bash in my path for actually calling preview.sh script.

yashamon commented 2 years ago

I have shell=cmd in init.vim but my environment is pwsh, and have similar issue on Windows. For the moment I just hard coded the s:bin:preview path to /mnt/c ... this works. So it seems that the path is not converted to WSL path in the script.