diff options
author | Carl Kamholtz <carl.kamholtz@gmail.com> | 2022-07-29 09:18:06 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 08:18:06 +0900 |
commit | 728f73528192a24e01f63fed3f4215125543c937 (patch) | |
tree | 2217ddced2ed81242c37e96a88abaa57ec662650 | |
parent | ecc418ba77e52660ffdd9ed84727b12c3f377680 (diff) |
[vim] Fix version check on windows/powershell (#2894)
- Replace fzf#shellescape with shellescape
- Prepend command with '&' in powershell to deal with quoted exe
-rw-r--r-- | plugin/fzf.vim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/fzf.vim b/plugin/fzf.vim index b80b7d77..1246af42 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 = 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 '' |