Shell (API)

From ComputerCraft Wiki
Revision as of 14:42, 2 May 2013 by Smiley43210 (Talk | contribs) (Added types, changed arg name for clarification)

Jump to: navigation, search

The shell API allows you to interface with the shell.

Grid disk.png   Shell (API)

Method NameDescription
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() Returns programs.
shell.run(string program, string arguments) Runs a program.
shell.getRunningProgram() Returns the absolute path to the currently-executing program.