mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 20:54:28 +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
|
endfunction
|
||||||
|
|
||||||
function! fzf#vim#tags(query, ...)
|
function! fzf#vim#tags(query, ...)
|
||||||
|
if !executable('perl')
|
||||||
|
return s:warn('Tags command requires perl')
|
||||||
|
endif
|
||||||
if empty(tagfiles())
|
if empty(tagfiles())
|
||||||
call inputsave()
|
call inputsave()
|
||||||
echohl WarningMsg
|
echohl WarningMsg
|
||||||
@@ -909,6 +912,9 @@ function! s:helptag_sink(line)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! fzf#vim#helptags(...)
|
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 sorted = sort(split(globpath(&runtimepath, 'doc/tags'), '\n'))
|
||||||
let tags = exists('*uniq') ? uniq(sorted) : fzf#vim#_uniq(sorted)
|
let tags = exists('*uniq') ? uniq(sorted) : fzf#vim#_uniq(sorted)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user