mirror of
https://github.com/junegunn/fzf.git
synced 2026-05-11 09:08:38 +08:00
[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: https://github.com/junegunn/fzf.vim/commit/bd3a021ec11617c56e6aa95578fee619445b029d
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user