Bug 245121

Summary: /usr/libexec/flua interpreter not allowing cursor movement
Product: Base System Reporter: 2333
Component: miscAssignee: Kyle Evans <kevans>
Status: Closed FIXED    
Severity: Affects Only Me CC: bugs, emaste, kevans
Priority: --- Keywords: feature
Version: 12.1-STABLEFlags: kevans: mfc-stable12+
kevans: mfc-stable11-
kevans: mfc-stable10-
Hardware: Any   
OS: Any   

Description 2333 2020-03-28 09:22:59 UTC
So flua is basically a Lua5.3 that can run some scripts on system startup. But has anyone tried using flua in the interpreter mode to do some quick jobs? One thing that annoys me is when using flua instead of the official Lua I am unable to move my cursors, for example when I type <arrow-left><arrow-right><arrow-up><arrow-bottom> I see:

^[[D^[[C^[[A^[[B

instead of allowing me to move cursors left to modify text or move up to repeat previous inputs.
Comment 1 commit-hook freebsd_committer freebsd_triage 2020-03-30 18:52:02 UTC
A commit references this bug:

Author: kevans
Date: Mon Mar 30 18:43:06 UTC 2020
New revision: 359453
URL: https://svnweb.freebsd.org/changeset/base/359453

Log:
  flua: enable readline bits, courtesy of libedit

  This is a nicer experience when attempting to run ad-hoc lua bits in the
  flua REPL.

  PR:		245121
  MFC after:	1 week

Changes:
  head/libexec/flua/Makefile
Comment 2 commit-hook freebsd_committer freebsd_triage 2020-04-06 04:06:33 UTC
A commit references this bug:

Author: kevans
Date: Mon Apr  6 04:06:16 UTC 2020
New revision: 359646
URL: https://svnweb.freebsd.org/changeset/base/359646

Log:
  MFC r359453, r359455

  r359453:
  flua: enable readline bits, courtesy of libedit

  This is a nicer experience when attempting to run ad-hoc lua bits in the
  flua REPL.

  r359455:
  flua: follow-up to r359453, don't bother with libedit in bootstrap

  The bootstrap flua should not be used for REPL-like activities; exclude it
  to save the dependency on libedit and not waste time with it.

  PR:		245121

Changes:
_U  stable/12/
  stable/12/libexec/flua/Makefile
Comment 3 Kyle Evans freebsd_committer freebsd_triage 2020-04-06 04:09:36 UTC
libedit in stable/11 is far enough behind, it's not worth the effort to bring it up to pair with stable/12 and head just for this; closing without touching it.