diff --git a/autoload/repl/erlang.vim b/autoload/repl/erlang.vim index 99d63cd..8a1d35f 100644 --- a/autoload/repl/erlang.vim +++ b/autoload/repl/erlang.vim @@ -39,9 +39,10 @@ function! repl#erlang#open_repl() abort cd %:p:h endif - let l:repl = repl#get_filetype_repl('erlang') - if !executable(l:repl['repl']) - call repl#echo_error(printf("You don't have repl: '%s'", l:repl['repl'])) + let l:repl = repl#get_filetype_repl('erlang') + let l:exec_name = split(l:repl['repl'], ' ')[0] + if !executable(l:exec_name) + call repl#echo_error(printf("You don't have repl: '%s'", l:exec_name)) return endif let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) diff --git a/autoload/repl/haskell.vim b/autoload/repl/haskell.vim index 8737a66..67e7317 100644 --- a/autoload/repl/haskell.vim +++ b/autoload/repl/haskell.vim @@ -10,9 +10,10 @@ function! repl#haskell#open_repl() abort let l:module_file = expand('%:p') endif - let l:repl = repl#get_filetype_repl('haskell') - if !executable(l:repl['repl']) - call repl#echo_error(printf("You don't have repl: '%s'", l:repl['repl'])) + let l:repl = repl#get_filetype_repl('haskell') + let l:exec_name = split(l:repl['repl'], ' ')[0] + if !executable(l:exec_name) + call repl#echo_error(printf("You don't have repl: '%s'", l:exec_name)) return endif let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) diff --git a/autoload/repl/python.vim b/autoload/repl/python.vim index 5307401..1228e60 100644 --- a/autoload/repl/python.vim +++ b/autoload/repl/python.vim @@ -10,9 +10,10 @@ function! repl#python#open_repl() abort let l:module_file = expand('%:p') endif - let l:repl = repl#get_filetype_repl('python') - if !executable(l:repl['repl']) - call repl#echo_error(printf("You don't have repl: '%s'", l:repl['repl'])) + let l:repl = repl#get_filetype_repl('python') + let l:exec_name = split(l:repl['repl'], ' ')[0] + if !executable(l:exec_name) + call repl#echo_error(printf("You don't have repl: '%s'", l:exec_name)) return endif let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file) diff --git a/autoload/repl/ruby.vim b/autoload/repl/ruby.vim index 44c4ddf..d5bc6e4 100644 --- a/autoload/repl/ruby.vim +++ b/autoload/repl/ruby.vim @@ -9,9 +9,10 @@ function! repl#ruby#open_repl() abort let l:module_file = expand('%:p') endif - let l:repl = repl#get_filetype_repl('ruby') - if !executable(l:repl['repl']) - call repl#echo_error(printf("You don't have repl: '%s'", l:repl['repl'])) + let l:repl = repl#get_filetype_repl('ruby') + let l:exec_name = split(l:repl['repl'], ' ')[0] + if !executable(l:exec_name) + call repl#echo_error(printf("You don't have repl: '%s'", l:exec_name)) return endif let l:args = printf('%s %s %s', l:repl['repl'], l:repl['opt'], l:module_file)