Difference between revisions of "Shell (API)"

From ComputerCraft Wiki
Jump to: navigation, search
m
Line 1: Line 1:
 
The shell API allows you to interface with the shell.
 
The shell API allows you to interface with the shell.
  
Its functions include:
+
{| border="1" cellpadding="2" cellspacing="0"
* shell.exit()
+
!style="background:#EEE" width="200px"|Method name
* shell.dir()
+
!style="background:#EEE" width="*"|Description
* shell.setDir( path )
+
|-
* shell.path()
+
|shell.exit()
* shell.setPath( path )
+
|Exits the program
* shell.resolve( localpath )
+
|-
* shell.resolveProgram( name )
+
|shell.dir()
* shell.aliases()
+
|Returns the directory
* shell.setAlias( alias, command )
+
|-
* shell.clearAlias( alias )
+
|shell.setDir( path )
* shell.programs()
+
|Sets the directory
* shell.run( program, arguments )
+
|-
 +
|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.
 +
|}
  
 
[[Category:APIs]]
 
[[Category:APIs]]

Revision as of 05:52, 31 January 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.