Skip to content

Commit

Permalink
[Tags/Helptags] Do not proceed if perl is not found
Browse files Browse the repository at this point in the history
Related: #22 (comment)
  • Loading branch information
junegunn committed Jun 30, 2017
1 parent e1c3bba commit 55f6bc8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions autoload/fzf/vim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 55f6bc8

Please sign in to comment.