help

Provides an API to read help files.

path()Returns a colon-separated list of directories where help files are searched for.
setPath(newPath)Sets the colon-seperated list of directories where help files are searched for to newPath
lookup(topic)Returns the location of the help file for the given topic.
topics()Returns a list of topics that can be looked up and/or displayed.
completeTopic(prefix)Returns a list of topic endings that match the prefix.
path()Source

Returns a colon-separated list of directories where help files are searched for. All directories are absolute.

Returns

  1. string The current help search path, separated by colons.

See also

setPath(newPath)Source

Sets the colon-seperated list of directories where help files are searched for to newPath

Parameters

  1. newPath string The new path to use.

Usage

  • help.setPath( "/disk/help/" )
  • help.setPath( help.path() .. ":/myfolder/help/" )

See also

lookup(topic)Source

Returns the location of the help file for the given topic.

Parameters

  1. topic string The topic to find

Returns

  1. string | nil The path to the given topic's help file, or nil if it cannot be found.

Usage

  • print(help.lookup("disk"))
topics()Source

Returns a list of topics that can be looked up and/or displayed.

Returns

  1. table A list of topics in alphabetical order.
completeTopic(prefix)Source

Returns a list of topic endings that match the prefix. Can be used with read to allow input of a help topic.

Parameters

  1. prefix string The prefix to match

Returns

  1. table A list of matching topics.