mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 12:44:24 +08:00
[Tags/Helptags] Do not proceed if perl is not found
Related: https://github.com/junegunn/fzf.vim/issues/22#issuecomment-311873515
This commit is contained in:
@@ -744,6 +744,9 @@ function! s:tags_sink(lines)
|
||||
endfunction
|
||||
|
||||
function! fzf#vim#tags(query, ...)
|
||||
if !executable('perl')
|
||||
return s:warn('Tags command requires perl')
|
||||
endif
|
||||
if empty(tagfiles())
|
||||
call inputsave()
|
||||
echohl WarningMsg
|
||||
@@ -909,6 +912,9 @@ function! s:helptag_sink(line)
|
||||
endfunction
|
||||
|
||||
function! fzf#vim#helptags(...)
|
||||
if !executable('perl')
|
||||
return s:warn('Helptags command requires perl')
|
||||
endif
|
||||
let sorted = sort(split(globpath(&runtimepath, 'doc/tags'), '\n'))
|
||||
let tags = exists('*uniq') ? uniq(sorted) : fzf#vim#_uniq(sorted)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user