[vim] Fix version check on windows/powershell (addendum)

Should handle powershell.exe as well

Fix https://github.com/junegunn/fzf.vim/issues/1411
pull/2902/head
Junegunn Choi 2 years ago
parent 3c08dca7e7
commit e5d8cbd383
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -164,7 +164,7 @@ function s:get_version(bin)
if has_key(s:versions, a:bin)
return s:versions[a:bin]
end
let command = (&shell == 'powershell' ? '&' : '') . 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 ''

Loading…
Cancel
Save