Difference between revisions of "Shell (API)"
From ComputerCraft Wiki
Smiley43210 (Talk | contribs) m (Edit description of shell.programs()) |
Smiley43210 (Talk | contribs) m (Add arg to shell.programs()) |
||
Line 39: | Line 39: | ||
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Clears an alias.</td></tr> | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Clears an alias.</td></tr> | ||
− | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[shell.programs]]()</td> | + | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[shell.programs]]({{type|boolean}} hidden)</td> |
<td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns a {{type|table}} of programs.</td></tr> | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Returns a {{type|table}} of programs.</td></tr> | ||
Revision as of 14:44, 2 May 2013
The shell API allows you to interface with the shell.
Method Name | Description |
shell.exit() | Exits the current shell |
shell.dir() | Returns the directory |
shell.setDir(string path) | Sets the directory |
shell.path() | Returns the path |
shell.setPath(string path) | Sets the path |
shell.resolve(string localpath) | Resolves a local path to an absolute path. |
shell.resolveProgram(string name) | Resolves the absolute path to the program whose name you provided. |
shell.aliases() | Returns aliases. |
shell.setAlias(string alias, string program) | Sets an alias. |
shell.clearAlias(string alias, string program) | Clears an alias. |
shell.programs(boolean hidden) | Returns a table of programs. |
shell.run(string program, string arguments) | Runs a program. |
shell.getRunningProgram() | Returns the absolute path to the currently-executing program. |