Skip to content

Commit

Permalink
[vim] Fix version check on windows/powershell (#2894)
Browse files Browse the repository at this point in the history
- Replace fzf#shellescape with shellescape
- Prepend command with '&' in powershell to deal with quoted exe
  • Loading branch information
Kamholtz committed Jul 28, 2022
1 parent ecc418b commit 728f735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/fzf.vim
Expand Up @@ -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 ''
Expand Down

0 comments on commit 728f735

Please sign in to comment.