[MacPorts] #42070: lua @5.2.2_1 arrow keys don't work in interpreter
#42070: lua @5.2.2_1 arrow keys don't work in interpreter -------------------------------+-------------------------------- Reporter: maxheinrich1988@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Keywords: lua arrow keys | Port: lua -------------------------------+-------------------------------- I can't use the arrow keys (left, right, up, down) in the lua interpreter. I installed it with {{{ ip220:~ max$ sudo port install lua }}} Pressing the arrow keys, I get the following output (left, up, right, down pressed) {{{ ip220:~ max$ lua Lua 5.2.2 Copyright (C) 1994-2013 Lua.org, PUC-Rio
^[[D^[[A^[[C^[[B }}}
-- Ticket URL: <https://trac.macports.org/ticket/42070> MacPorts <http://www.macports.org/> Ports system for OS X
#42070: lua @5.2.2_1 arrow keys don't work in interpreter --------------------------------+-------------------------------- Reporter: maxheinrich1988@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: lua arrow keys Port: lua | --------------------------------+-------------------------------- Comment (by vince@…): Something is wrong with readline? -- Ticket URL: <https://trac.macports.org/ticket/42070#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
#42070: lua @5.2.2_1 arrow keys don't work in interpreter --------------------------------+-------------------------------- Reporter: maxheinrich1988@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: lua | --------------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: lua arrow keys => Comment: You could invoke `lua` with `rlwrap` in the meantime. -- Ticket URL: <https://trac.macports.org/ticket/42070#comment:2> MacPorts <http://www.macports.org/> Ports system for OS X
#42070: lua @5.2.2_1 arrow keys don't work in interpreter --------------------------------+-------------------------------- Reporter: maxheinrich1988@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: lua | --------------------------------+-------------------------------- Comment (by maxheinrich1988@…): Replying to [comment:2 ryandesign@…]:
You could invoke `lua` with `rlwrap` in the meantime.
This works for me. Thanks! {{{ sudo port install rlwrap rlwrap lua }}} -- Ticket URL: <https://trac.macports.org/ticket/42070#comment:3> MacPorts <http://www.macports.org/> Ports system for OS X
#42070: lua @5.2.2_1 arrow keys don't work in interpreter --------------------------------+-------------------------------- Reporter: maxheinrich1988@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.2.1 Resolution: | Keywords: Port: lua | --------------------------------+-------------------------------- Comment (by pawrsccouk@…): I am getting the same issue with lua 5.2.3 as of 7th July 2014. Looking at the build, it appears that readline is invoked when building the object files for the lua library (liblua.dylib) but is not invoked when building the lua executable. In the makefile at {{{/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_lua/lua/work/lua-5.2.3/src }}} The line building the final executable is {{{ $(LUA_T): $(LUA_O) $(LUA_A) $(CC) -o $@ -L. $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua lua.c }}} If I change this to {{{ $(LUA_T): $(LUA_O) $(LUA_A) $(CC) -o $@ -L. $(SYSCFLAGS) $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua lua.c }}} and recompile, then it uses the readline library as expected. This is at line 69 of the Makefile. It appears that SYSCFLAGS is not passed to the compiler. This is the variable that includes the header definitions for the macosx platform, which causes readline to be selected in luaconf.h. -- Ticket URL: <https://trac.macports.org/ticket/42070#comment:4> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts