From e5d8cbd383ffb0c272c654cab8a3f40385d094f4 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sat, 30 Jul 2022 19:07:39 +0900 Subject: [PATCH] [vim] Fix version check on windows/powershell (addendum) Should handle powershell.exe as well Fix https://github.com/junegunn/fzf.vim/issues/1411 --- plugin/fzf.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/fzf.vim b/plugin/fzf.vim index 6fada6c..4dd7ece 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 = (&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 ''