Difference between revisions of "Shell (API)"
From ComputerCraft Wiki
Zalerinian (Talk | contribs) (fixed an error) |
|||
Line 1: | Line 1: | ||
The shell API allows you to interface with the [http://en.wikipedia.org/wiki/Shell_%28computing%29 shell]. | The shell API allows you to interface with the [http://en.wikipedia.org/wiki/Shell_%28computing%29 shell]. | ||
+ | ==Methods== | ||
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
!style="background:#EEE" width="200px"|Method name | !style="background:#EEE" width="200px"|Method name | ||
!style="background:#EEE" width="*"|Description | !style="background:#EEE" width="*"|Description | ||
|- | |- | ||
− | |shell.exit() | + | |[[shell.exit]]() |
|Exits the program | |Exits the program | ||
|- | |- | ||
− | |shell.dir() | + | |[[shell.dir]]() |
|Returns the directory | |Returns the directory | ||
|- | |- | ||
− | |shell.setDir( path ) | + | |[[shell.setDir]]( path ) |
|Sets the directory | |Sets the directory | ||
|- | |- | ||
− | |shell.path() | + | |[[shell.path]]() |
|Returns the path | |Returns the path | ||
|- | |- | ||
− | |shell.setPath( path ) | + | |[[shell.setPath]]( path ) |
|Sets the path | |Sets the path | ||
|- | |- | ||
− | |shell.resolve( localpath ) | + | |[[shell.resolve]]( localpath ) |
|<no description given> | |<no description given> | ||
|- | |- | ||
− | |shell.resolveProgram( name ) | + | |[[shell.resolveProgram]]( name ) |
|<no description given> | |<no description given> | ||
|- | |- | ||
− | |shell.aliases() | + | |[[shell.aliases]]() |
|Returns aliases. | |Returns aliases. | ||
|- | |- | ||
− | |shell.setAlias( alias, command ) | + | |[[shell.setAlias]]( alias, command ) |
|Sets an alias. | |Sets an alias. | ||
|- | |- | ||
− | |shell.clearAlias( alias, command ) | + | |[[shell.clearAlias]]( alias, command ) |
|Clears an alias. | |Clears an alias. | ||
|- | |- | ||
− | |shell.programs() | + | |[[shell.programs]]() |
|Returns programs. | |Returns programs. | ||
|- | |- | ||
− | |shell.run( program, arguments ) | + | |[[shell.run]]( program, arguments ) |
|Runs a program. | |Runs a program. | ||
|- | |- | ||
− | |shell.getRunningProgram() | + | |[[shell.getRunningProgram]]() |
|Returns the absolute path to the currently-executing program. | |Returns the absolute path to the currently-executing program. | ||
|- | |- |
Revision as of 08:10, 30 May 2012
The shell API allows you to interface with the shell.
Methods
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. |