[vim] See the last line of "fzf --version" output

The output may contain some unexpected warning messages from the shell
if it's not properly configured. While such extra messages should be
properly addressed by the user, we can ignore them by checking the
last line of the output instead of the first line.

Related: bd3a021ec1
pull/2233/head
Junegunn Choi 4 years ago
parent d4c9db0a27
commit 1c68f81c37
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

@ -189,7 +189,7 @@ function! fzf#exec(...)
if v:shell_error || empty(output)
throw printf('Failed to run "%s": %s', command, output)
endif
let fzf_version = matchstr(output[0], '[0-9.]\+')
let fzf_version = matchstr(output[-1], '[0-9.]\+')
if s:version_requirement(fzf_version, a:1)
let s:checked[a:1] = 1
return s:exec

Loading…
Cancel
Save