help.completeTopic

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  Function help.completeTopic
Added by ComputerCraft 1.74, help.completeTopic() can be passed a part of a help topic title, and returns a numerically indexed table containing strings that could be used to complete it (based on the list of topics returned by help.topics()).

See also: textutils.complete(), shell.complete(), shell.setCompletionFunction(), shell.completeProgram() and fs.complete().
Syntax help.completeTopic(string partial topic name)
Returns table completion list
Part of ComputerCraft
API help

Examples

Grid paper.png  Example
Generates a table containing suffixes that could be combined with "ex" to get valid help topic titles.
Code
for _, match in pairs( help.completeTopic("ex") ) do print( match ) end
Output cavate

ec

it