raylib-lua-legacy/repl/main.lua

20 lines
446 B
Lua
Raw Permalink Normal View History

2020-04-17 17:40:45 +00:00
local repl = require 'repl.console'
local rcfile_loaded = repl:loadplugin 'rcfile'
if not rcfile_loaded then
local has_linenoise = pcall(require, 'linenoise')
if has_linenoise then
repl:loadplugin 'linenoise'
else
pcall(repl.loadplugin, repl, 'rlwrap')
end
repl:loadplugin 'history'
repl:loadplugin 'completion'
repl:loadplugin 'autoreturn'
end
print('Lua REPL ' .. tostring(repl.VERSION))
repl:run()