'preview not working on neovim 0.5 on windows 10 with fzf

i'm running neovim 0.5 with fzf-vim on windows 10 and can't seem to make preview to work.

my init.vim per below:

call plug#begin('~/AppData/Local/nvim/plugged')

    Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
    Plug 'junegunn/fzf.vim'
call plug#end()

let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.9 } }
let $FZF_DEFAULT_OPTS="--ansi --preview-window 'right:60%' --layout reverse --margin=1,4"

Error msg i got when previewing files using :Files or :Rg command: /mnt/c/Users/XXXXX/AppData/Local/nvim/plugged/fzf.vim/bin/preview.sh: line 2: $'\r': command not found
/mnt/c/Users/XXXXX/AppData/Local/nvim/plugged/fzf.vim/bin/preview.sh: line 5: $'\r': command not found
/mnt/c/Users/XXXXX/AppData/Local/nvim/plugged/fzf.vim/bin/preview.sh: line 40: syntax error near unexpected token /mnt/c/Users/XXXXX/AppData/Local/nvim/plugged/fzf.vim/bin/preview.sh: line 40: ` elif [ -n "$MSWINHOME" ]; then

have confirmed that bash.exe from c:\Program Files\Git\bin\ is in PATH.



Solution 1:[1]

  1. Install Git for Windows if you haven't already installed it.

  2. Add the following line to your init.vim file.

    let $PATH = "C:\\Program Files\\Git\\usr\\bin;" . $PATH

  3. Save and Reload NeoVim.

Solution 2:[2]

i solved it adding "C:\Program Files\Git\usr\bin" to the PATH environment variable in Windows 10

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ribtoks
Solution 2 God Wandroid