Naev

Module linenoise

Command-line library.

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

Functions

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


Functions

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.
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.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.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.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.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.
generated by LDoc 1.5.0 Last updated 2025-05-18 01:00:15