Skip to content

Commit

Permalink
Replace a hard-coded list with a keys() call
Browse files Browse the repository at this point in the history
  • Loading branch information
wincent committed Jan 8, 2017
1 parent 024d370 commit dbfbe1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugin/ferret.vim
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,9 @@ let s:executables={
" Would ideally have these in an autoload file, but want to defer autoload
" until as late as possible.
function! FerretExecutable()
let l:valid=keys(s:executables)
let l:executables=split(s:force, '\v\s*,\s*')
let l:executables=filter(l:executables, 'index(["rg", "ag", "ack"], v:val) != -1')
let l:executables=filter(l:executables, 'index(l:valid, v:val) != -1')
if index(l:executables, 'rg') == -1
call add(l:executables, 'rg')
endif
Expand Down

0 comments on commit dbfbe1b

Please sign in to comment.