Skip to content

Commit

Permalink
[vim] See the last line of "fzf --version" output
Browse files Browse the repository at this point in the history
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: junegunn/fzf.vim@bd3a021
  • Loading branch information
junegunn committed Oct 30, 2020
1 parent d4c9db0 commit 1c68f81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugin/fzf.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c68f81

Please sign in to comment.