luaprompt

A Lua command prompt with pretty-printing and auto-completion

$ luarocks install luaprompt

luaprompt is both an interactive Lua prompt that can be used instead
of the official interpreter, as well as module that provides a Lua
command prompt that can be embedded in a host application. As a
standalone interpreter it provides many conveniences that are missing
from the official Lua interpreter. As an embedded prompt, 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.

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. Module names are also completed, for modules
installed in the standard directories, and completed modules can
optionally be loaded.

* Persistent command history (retained across sessions), as well as
recording of command results for future reference.

* Proper value pretty-printing for interactive use: When an expression
is entered at the prompt, all returned values are printed
(prepending with an equal sign is not required). Values are printed
in a descriptive way that tries to be as readable as possible. The
formatting tries to mimic Lua code (this is done to minimize
ambiguities and no guarantees are made that it is valid code).
Additionally, each value is stored in a table for future reference.

* Color highlighting of error messages and variable printouts.

Versions

0.9-154 days ago553 downloads
0.8-11 year ago4,101 downloads
0.7-19 years ago21,005 downloads
0.6-19 years ago216 downloads

Dependencies

lua >= 5.1

Dependency for

prompt-style

Manifests