Skip to content
Myr

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

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Should handle powershell.exe as well Fix https://github.com/junegunn/fzf.vim/issues/1411

authored by Junegunn Choi · committed by Junegunn Choi · parent 3c08dca · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:plugin/fzf.vim+1 added-1 removed
162 unmodified lines
163function s:get_version(bin)164 if has_key(s:versions, a:bin)165 return s:versions[a:bin]166 end167 let command = (&shell == 'powershell' ? '&' : '') . shellescape(a:bin) . ' --version --no-height'167 let command = (&shell =~ 'powershell' ? '&' : '') . shellescape(a:bin) . ' --version --no-height'168 let output = systemlist(command)169 if v:shell_error || empty(output)170 return ''171 endif
889 unmodified lines