Skip to content
Myr

Make :FZF work in Vim from Git Bash (#3798)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* make :FZF work in Vim from Git Bash Despite its title 'Calling fzf#run with a list as source fail (n)vim is used from git bash' the issue in https://github.com/junegunn/fzf/issues/3777 of running `:FZF` in Vim in Git Bash was apparently only fixed for Neovim in Git Bash on Windows 11, but not for Vim from Git Bash. In view of this, replacing /C by ///C might be considered a universal fix. This PR just proposes the patch in https://github.com/junegunn/fzf/issues/1983 that still seems open. In view of the fourth item in the most recent 2.45.0 https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues little seems to have changed regarding path conversion of arguments containing forward slashes * prefer doubling slashed instead of generic env. var If MSYS_NO_PATHCONV=1 is used, then all arguments are preserved, in particular possibly paths passed in s:command. Therefore, only avoid converting `/C` from `cmd` to a path.

authored by Enno · committed by GitHub · parent 030428b · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:plugin/fzf.vim+1 added-1 removed
709 unmodified lines
710 endif711 elseif has('win32unix') && $TERM !=# 'cygwin'712 let shellscript = s:fzf_tempname()713 call s:writefile([command], shellscript)714 let command = 'cmd.exe /C '.fzf#shellescape('set "TERM=" & start /WAIT sh -c '.shellscript)714 let command = 'cmd.exe //C '.fzf#shellescape('set "TERM=" & start /WAIT sh -c '.shellscript)715 let a:temps.shellscript = shellscript716 endif717 if a:use_height718 let stdin = has_key(a:dict, 'source') ? '' : '< /dev/tty'
376 unmodified lines