lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


luaprompt is a simple library that provides a Lua command prompt
that can be embedded in a host application. It's meant for
applications that use Lua as a configuration or interface
language and can therefore benefit from an interactive prompt for
debugging or regular use.

Also included is luap, an interactive interpreter which tries to
mimic the standard lua interpreter as much as possible while
providing the extra set of features described below. Some
tweaking of the makefile may be required to get it to build.

luaprompt features:

    * Readline-based input with history and completion: In
      particular all keywords, global variables and table
      accesses (with string or integer keys) can be completed in
      addition to readline's standard file completion.

    * Persistent command history (retained across sessions).

    * Proper value pretty-printing for interactive use.

    * Color highlighting of error messages and variable printouts.

This release includes a few completion-related improvements:

* Symbol names can be excluded from consideration during completion
if they start with a configurable prefix.  This allows, for
example, variables starting with an underscore to be treated
as "hidden". The prefix used is a compile-time constant and can be configured through the Makefile.

* The auto-completer now adds certain useful suffixes to completed
symbol names depending on their type.  An opening parenthesis is
added to function values and either a dot or an opening bracket
is added to table values. The behavior of this feature can also be controlled at compile-time. See the Makefile for more information.

* Multi-line statement handling has (hopefully) been improved somewhat by treating whole statements as a single line, when browsing through the command history.

You can find more information as well as a download link at
either luaprompt's homepage at

http://www.nongnu.org/techne/lua/luaprompt/

or its project page on GitHub at

https://github.com/dpapavas/luaprompt

Dimitris