Naev

Module linenoise

Command-line library.

See https://github.com/hoelzro/lua-linenoise.

Functions

ln.linenoise (prompt) Return a line of user input.
ln.historyadd (line) Adds a line to the history list.
ln.historysave (filename) Saves the history to the given file path.
ln.historyload (filename) Loads the history from the given file path.
ln.setcompletion (callback) Sets the completion callback (which should call ln.addcompletion() once per suggested completion of "line").
ln.addcompletion (completions, option) Adds string to the list of completions.


Functions

ln.linenoise (prompt)
Return a line of user input. (Actually, just awaits it.)

Parameters:

  • prompt string A prompt like "> " or ">> " to put in front of the line.
ln.historyadd (line)
Adds a line to the history list.

TODO This is a stub implementation that doesn't work.

Parameters:

  • line string Input line to add.
ln.historysave (filename)
Saves the history to the given file path.

TODO This is a stub implementation that doesn't work.

Parameters:

  • filename string PhysicsFS path to the history file.
ln.historyload (filename)
Loads the history from the given file path.

TODO This is a stub implementation that doesn't work.

Parameters:

  • filename string PhysicsFS path to the history file.
ln.setcompletion (callback)
Sets the completion callback (which should call ln.addcompletion() once per suggested completion of "line").

TODO This is a stub implementation that doesn't work.

Parameters:

  • callback function function(completions, line) which may call ln.addcompletion() with the opaque completions object.
ln.addcompletion (completions, option)
Adds string to the list of completions. (To be called by the completion callback.)

TODO This is a stub implementation that doesn't work.

Parameters:

  • completions The object passed to the completion callback.
  • option string A possible completion.
generated by LDoc 1.4.6 Last updated 2022-01-27 18:12:12