Difference between revisions of "Shell (API)"
From ComputerCraft Wiki
(Document shell.getRunningProgram()) |
m (Added link to page explaining what a shell is.) |
||
| Line 1: | Line 1: | ||
| − | The shell API allows you to interface with the shell. | + | The shell API allows you to interface with the [http://en.wikipedia.org/wiki/Shell_%28computing%29 shell]. |
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
Revision as of 13:53, 2 May 2012
The shell API allows you to interface with the shell.
| Method name | Description |
|---|---|
| shell.exit() | Exits the program |
| shell.dir() | Returns the directory |
| shell.setDir( path ) | Sets the directory |
| shell.path() | Returns the path |
| shell.setPath( path ) | Sets the path |
| shell.resolve( localpath ) | <no description given> |
| shell.resolveProgram( name ) | <no description given> |
| shell.aliases() | Returns aliases. |
| shell.setAlias( alias, command ) | Sets an alias. |
| shell.clearAlias( alias, command ) | Clears an alias. |
| shell.programs() | Returns programs. |
| shell.run( program, arguments ) | Runs a program. |
| shell.getRunningProgram() | Returns the absolute path to the currently-executing program. |