summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorCarl Kamholtz <carl.kamholtz@gmail.com>2022-07-29 09:18:06 +1000
committerGitHub <noreply@github.com>2022-07-29 08:18:06 +0900
commit728f73528192a24e01f63fed3f4215125543c937 (patch)
tree2217ddced2ed81242c37e96a88abaa57ec662650 /plugin
parentecc418ba77e52660ffdd9ed84727b12c3f377680 (diff)
[vim] Fix version check on windows/powershell (#2894)
- Replace fzf#shellescape with shellescape - Prepend command with '&' in powershell to deal with quoted exe
Diffstat (limited to 'plugin')
-rw-r--r--plugin/fzf.vim2
1 files changed, 1 insertions, 1 deletions
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 ''