[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: [ANN] ILuaJIT - Readline powered shell for LuaJIT
- From: Julien Desgats <julien.desgats@...>
- Date: Thu, 22 Dec 2011 21:18:12 +0100
Hi all,
I've started playing with with readline and the new LuaJIT FFI
callbacks (which are fantastic :) in order to make a more user
friendly shell (a bit like IPython does for Python): ILuaJIT[1].
So far, I've managed to integrate Reuben Thomas's lua-rlcompleter [2]
completion engine and some other stuff like improved error handler
(with source code printing when possible and colors).
This is just a toy project for now and any contribution is welcome to
improve it.
The shell is fully configurable through the `shell` global variable
(prompt, result handler, error handler, completion, ...), see
shell.lua. For instance, to pretty print table with Penlight (with
ugly output with multiple values through) :
shell.value.handler = function(pos, val)
return type(val) == "table" and pl.pretty.write(val) or tostring(val)
end
I hope this will be useful to you !
[1] https://github.com/jdesgats/ILuaJIT
[2] https://github.com/rrthomas/lua-rlcompleter
Regards,
Julien Desgats