Lua 5.3 history handling in interactive mode is unavaiable
How reproduce this bug?
Run `lua` command, type `print(“hello”)` and hit enter button, then use “” button to get previous command, but nothing happend.
From the package “lua5.3” build files https://git.alpinelinux.org/cgit/aports/tree/main/lua5.3?h=3.8-stable
I notice Alpine use linenoise instead of GNU readline, but the patch https://git.alpinelinux.org/cgit/aports/tree/main/lua5.3/linenoise.patch?h=3.8-stable is outdated.
Take a look a Lua source https://github.com/lua/lua/blob/v5-3-4/lua.c\#L85 the code had changed to `lua_saveline(L,line)`, the changing since 5.3.1, see https://github.com/lua/lua/commit/57c0db219b9ee48d951adf68a577b4eec5309e57
After I changed it to `#define lua_saveline(L,line) ((void)L, linenoiseHistoryAdd(line))` and recompile, the history handing work again.
(from redmine: issue id 9644, created on 2018-11-15, closed on 2018-12-20)
- Changesets:
- Revision cde8024d by Natanael Copa on 2018-12-04T11:48:01Z:
main/lua5.3: fix linenoise patch
ref #9644
- Revision fc230a5b by Natanael Copa on 2018-12-04T11:52:11Z:
main/lua5.3: fix linenoise patch
fixes #9644
(cherry picked from commit cde8024d0da937f5f7b0b9b329c1f27c14b00308)
- Revision 25cda9a8 by Natanael Copa on 2019-05-06T17:18:42Z:
main/lua5.3: fix linenoise patch
fixes #9644
(cherry picked from commit cde8024d0da937f5f7b0b9b329c1f27c14b00308)
- Revision 23eacac2 by Natanael Copa on 2019-05-06T17:21:08Z:
main/lua5.3: fix linenoise patch
fixes #9644
(cherry picked from commit cde8024d0da937f5f7b0b9b329c1f27c14b00308)