From 728f73528192a24e01f63fed3f4215125543c937 Mon Sep 17 00:00:00 2001 From: Carl Kamholtz Date: Fri, 29 Jul 2022 09:18:06 +1000 Subject: [PATCH] [vim] Fix version check on windows/powershell (#2894) - Replace fzf#shellescape with shellescape - Prepend command with '&' in powershell to deal with quoted exe --- plugin/fzf.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index b80b7d77..1246af42 100644 --- a/plugin/fzf.vim +++ b/plugin/fzf.vim @@ -164,7 +164,7 @@ function s:get_version(bin) if has_key(s:versions, a:bin) return s:versions[a:bin] end - let command = fzf#shellescape(a:bin) . ' --version --no-height' + let command = (&shell == 'powershell' ? '&' : '') . shellescape(a:bin) . ' --version --no-height' let output = systemlist(command) if v:shell_error || empty(output) return ''