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

Should handle powershell.exe as well

Fix https://github.com/junegunn/fzf.vim/issues/1411
This commit is contained in:
Junegunn Choi 2022-07-30 19:07:39 +09:00
parent 3c08dca7e7
commit e5d8cbd383
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 1 additions and 1 deletions

View File

@ -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 ''