Difference between revisions of "Shell (API)"
From ComputerCraft Wiki
| Line 7: | Line 7: | ||
|- | |- | ||
|[[shell.exit]]() | |[[shell.exit]]() | ||
| − | |Exits the | + | |Exits the current shell |
|- | |- | ||
|[[shell.dir]]() | |[[shell.dir]]() | ||
Revision as of 08:09, 22 September 2012
The shell API allows you to interface with the shell.
Methods
| Method name | Description |
|---|---|
| shell.exit() | Exits the current shell |
| 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 ) | Resolves a local path to an absolute path. |
| shell.resolveProgram( name ) | Resolves the absolute path to the program whose name you provided. |
| 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. |