commands.list

From ComputerCraft Wiki
Revision as of 16:46, 16 February 2015 by MKlegoman357 (Talk | contribs) (Created page with "{{lowercase}} {{Function |name=commands.list |args= |returns={{type|table}} commands |api=commands |addon=ComputerCraft |desc=Available only to Command Computers, returns...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Grid Redstone.png  Function commands.list
Available only to Command Computers, returns a numerically indexed table filled with strings representing acceptable commands for commands.exec() / commands.execAsync(). This function yields internally and might 'eat' some events, such as rednet_message or key.
Syntax commands.list()
Returns table commands
Part of ComputerCraft
API commands

Examples

Grid paper.png  Example
Prints all the available commands
Code
local commands = commands.list()

textutils.pagedTabulate( commands )


Grid disk.png Commands API Functions
commands.exec - commands.execAsync - commands.list - commands.getBlockPosition - commands.getBlockInfo - commands.getBlockInfos