You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the issue is related to junegunn/fzf.vim#1543 in which it finds bash but it expands the path using cmd and gets a path separated with backlashes \ which bash (or vim) may not like.
I've built my own Rg command and this is how I built the preview
" find bash from git for windowsletg:bash=substitute(system('where.exe bash | awk "/[Gg]it/ {print}" | tr -d "\r\n"'), '\n', '', '')
" Transform bash path to use '/'let bash_path =shellescape(substitute(g:bash, '\\', '/', 'g'))
" Path to preview script. The preview.sh file is the same as fzf.vim/bin/preview.sh with slightly modifications from my part." The MSYS style path '/c' is irrelevant here. Window style path works the same.let preview_path =substitute('/c' . $HOMEPATH . '\scripts\utils\preview.sh', '\\', '/', 'g')
let command_preview = bash_path . '' . preview_path . ' {}'
The preview command will look like this when executed by fzf.vim
The shorted path to bash is generated by passing the path to split(system('for %A in ("'. a:path .'") do @echo %~sA'), "\n")[0] which fzf.vim does internally and it always returns a backlashed path. If you change it to forward slash, it works.
An simple workaround is to manually add the preview arguments rather than calling fzf#vim#with_preview. What it does is to add the --preview argument and a toggle preview binding.
man fzf
)Info
Problem / Steps to reproduce
/bin/bash: line1: C:/Users/mindentropy/vimfiles/plugged/fzf.vim/bin/preview.sh
I check preview.sh and it has
#!/usr/bin/env bash
but I am not sure whether it is picking up bash. Is Rg supported on Windows 11?The text was updated successfully, but these errors were encountered: