mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-22 04:45:14 +00:00
[vim] Fix version check on windows/powershell (#2894)
- Replace fzf#shellescape with shellescape - Prepend command with '&' in powershell to deal with quoted exe
This commit is contained in:
parent
ecc418ba77
commit
728f735281
@ -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 ''
|
||||
|
Loading…
Reference in New Issue
Block a user