Developer_release_1.4.0

Class lua-repl.REPL

Lua REPL object.

Fields

lua-repl.REPL.always_pretty (boolean) Pretty printing every result.
lua-repl.REPL.max_output_length (number|nil) Limit the command output length.
lua-repl.REPL.shortcuts (string) List of shortcuts available in Lua REPL: - autocomplete or show a list of possible variants.

Methods

lua-repl.REPL:OS (cmd) Execute OS command.
lua-repl.REPL:clear (self) Clear terminal window.
lua-repl.REPL:get_modules ([filter=nil[, plain=true]]) Get list of available modules.
lua-repl.REPL:get_modules_with_docs ([filter=nil[, plain=true]]) Get list of available modules with documentation.
lua-repl.REPL:get_packages ([filter=nil[, plain=true]]) Get list of available packages.
lua-repl.REPL:help ([entity='REPL.help']) Show help or documentation about the entity given by the argument.
lua-repl.REPL:restart () Restart Lua REPL.


Fields

lua-repl.REPL.always_pretty
(boolean) Pretty printing every result.
lua-repl.REPL.max_output_length
(number|nil) Limit the command output length. `nil` - unlimited.
lua-repl.REPL.shortcuts
(string) List of shortcuts available in Lua REPL: - autocomplete or show a list of possible variants. Press again to enter interactive mode. Then use arrow keys to select the variant and to insert the selected variant to the command line. - show documentation for the entity under cursor if possible. - show the source code of the function under cursor if possible. If the source code is large then only first lines is output. Press again to get next lines. - clear screen

Methods

lua-repl.REPL:OS (cmd)
Execute OS command.

Parameters:

  • cmd string Command to execute

Returns:

    string Captured stdout (on success)

Or

  1. nil
  2. string Error message (on failure)

Usage:

    REPL:OS('pwd')
lua-repl.REPL:clear (self)
Clear terminal window.

Parameters:

  • self from terminal_processor
lua-repl.REPL:get_modules ([filter=nil[, plain=true]])
Get list of available modules.

Parameters:

  • filter string Optional filter. By default (`plain = true`) exclude items if substring `filter` is not found in the module name. If `plain = false` exclude items that doesn't match `filter` Lua string pattern. (default nil)
  • plain boolean Substring or Lua string pattern filtering. (default true)

Returns:

    table List of module names.

Usage:

    all_modules = REPL:get_modules()
    dbus_modules = REPL:get_modules('dbus')
    lua_repl_lib_modules = REPL:get_modules('^lua-repl.lib', false)
lua-repl.REPL:get_modules_with_docs ([filter=nil[, plain=true]])
Get list of available modules with documentation.

Parameters:

  • filter string Optional filter. By default (`plain = true`) exclude items if substring `filter` is not found in the module name. If `plain = false` exclude items that doesn't match `filter` Lua string pattern. (default nil)
  • plain boolean Substring or Lua string pattern filtering. (default true)

Returns:

    table List of module names.

Usage:

    all_modules = REPL:get_modules_with_docs()
    dbus_modules = REPL:get_modules_with_docs('dbus')
    lua_repl_lib_modules = REPL:get_modules_with_docs('^lua-repl.lib', false)
lua-repl.REPL:get_packages ([filter=nil[, plain=true]])
Get list of available packages.

Parameters:

  • filter string Optional filter. By default (`plain = true`) exclude items if substring `filter` is not found in the package name. If `plain = false` exclude items that doesn't match `filter` Lua string pattern. (default nil)
  • plain boolean Substring or Lua string pattern filtering. (default true)

Returns:

    table List of package names.

Usage:

    all_packages = REPL:get_packages()
    dbus_packages = REPL:get_packages('dbus')
    lua_repl_lib_packages = REPL:get_packages('^lua-repl.lib', false)
lua-repl.REPL:help ([entity='REPL.help'])
Show help or documentation about the entity given by the argument.

Parameters:

  • entity string, function or table Entity (default 'REPL.help')

Usage:

    REPL:help()
    REPL:help 'REPL.shortcuts'
    REPL.shortcuts<Ctrl+Alt+D>
lua-repl.REPL:restart ()
Restart Lua REPL.

Usage:

    REPL:restart()
generated by LDoc 1.4.6 Last updated 1980-01-01 00:00:00