Fix executable status detection
This commit is contained in:
parent
1a3e11664b
commit
8dec444fe9
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user