Re: readline support + history in interactive mode

  • From: Justin Cormack <justin@xxxxxxxxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 14 Mar 2013 12:00:29 +0000

On 14 Mar 2013 11:36, "Paulo Matias" <syscoder@xxxxxxxxx> wrote:
>
> On Thu, Mar 14, 2013 at 1:26 AM, Vadim A. Misbakh-Soloviov <mva@xxxxxxxx>
wrote:
> > But I very, VERY miss history in interactive mode. And I also use LuaJIT
> > instead (not together) of plain Lua, so I unable to use plain Lua for
> > interactive mode ;)
>
> The attached quick&dirty patch adds history support to LuaJIT using
> linenoise (included in the patch). I have tested it in Android and
> GNU/Linux builds.
>
> Note: you need to run the following after applying the patch:
> cd src && make depend

I have also used luap from here
http://www.nongnu.org/techne/lua/luaprompt/which means no patching
plus some nice features like pretty printing.

Justin

Other related posts: