Re: readline support + history in interactive mode

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

On 14 Mar 2013 14:01, "Vadim A. Misbakh-Soloviov" <mva@xxxxxxxx> wrote:
>
> 14.03.2013 19:00, Justin Cormack пишет:
> >
> > On 14 Mar 2013 11:36, "Paulo Matias" <syscoder@xxxxxxxxx
> > <mailto:syscoder@xxxxxxxxx>> wrote:
> >>
> >> On Thu, Mar 14, 2013 at 1:26 AM, Vadim A. Misbakh-Soloviov
> > <mva@xxxxxxxx <mailto: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
> >
>
> I just discovered that it:
> 1) doesn't understand "=" (at the line beginning) as "return", which is
> not a big issue itself, but:
> 2) it tries to open "~/.lua_history" (sic!). It doesn't expand it to
> $HOME/.lua_history and so then get ENOENT.
>
> And, it seems, it is no issue tracker and VCS repository for luap :(
>

The author has responded on the Lua mauling list and fixed issues. But a
repo would be nice.

Justin

Other related posts: