Module readline

A Readline implementation.

Provides a fairly complete readline function. It supports line editing, history, and obfuscation. Loading this with require will provide only a single function, readline.

Functions

readline ([opts]) Read a line of input.

Tables

rlopts Readline options.


Functions

readline ([opts])
Read a line of input.

Parameters:

  • opts Readline options (optional)

Returns:

    string The input that was read

Tables

rlopts
Readline options. All fields in this table are optional.

Fields:

  • prompt string A prompt to display
  • history table A table of history
  • noexit boolean Do not exit on ^D
  • exit function A function to call instead of os.exit when ^D is pressed, unless noexit is set
  • complete function A function that takes a buffer and cursor index, and returns a table of valid completions. A single completion result will be inserted into the buffer; otherwise multiple results will be tabulated.
generated by LDoc 1.4.6 Last updated 2023-03-04 11:42:14