Shell API
|
|||||||||||
Returns a list of all aliases. | |||||||||||
Syntax | shell.aliases() | ||||||||||
Returns | table | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | shell | ||||||||||
|
|
|||||||||
Clears an alias. | |||||||||
Syntax | shell.clearAlias(
|
||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | shell | ||||||||
|
Shell.complete Shell.completeProgram
|
|||||||||||
Returns the current shell working directory. Set by shell.setDir programmatically or the cd command from the shell itself. The working directory is displayed before the > of the shell prompt, and is used as the first component of relative paths by programs such as ls . |
|||||||||||
Syntax | shell.dir() | ||||||||||
Returns | string path | ||||||||||
Part of | CC:Tweaked | ||||||||||
API | shell | ||||||||||
|
|
|||||||||
Close the current shell. | |||||||||
Syntax | shell.exit() | ||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | shell | ||||||||
|
Shell.getCompletionInfo
|
|||||||||||
Returns the running program executed by shell.run. | |||||||||||
Syntax | shell.getRunningProgram() | ||||||||||
Returns | string path | ||||||||||
Part of | CC:Tweaked | ||||||||||
API | shell | ||||||||||
|
|
|||||||||
Run a program in a new multishell tab in the shell enviroment. This function only exits if multishell is enabled. | |||||||||
Syntax | shell.openTab(
|
||||||||
Returns | number tabid | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | shell | ||||||||
|
|
|||||||||||
Returns the Shellpath. The Shellpath is a list of folders, where the shell are searching for programs. The directories are separated with :. | |||||||||||
Syntax | shell.path() | ||||||||||
Returns | string | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | shell | ||||||||||
|
|
|||||||||||
Returns a list of all Programs in the Shellpath. | |||||||||||
Syntax | shell.programs() | ||||||||||
Returns | table | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | shell | ||||||||||
|
Shell.resolve Shell.resolveProgram
,
|
|||||||||||
Runs a command in the computer's or turtle's shell. | |||||||||||
Syntax | shell.run(
|
||||||||||
Returns | boolean success | ||||||||||
Part of | CC:Tweaked | ||||||||||
API | shell | ||||||||||
| |||||||||||
|
|
|||||||||
Set an alias. | |||||||||
Syntax | shell.setAlias(
|
||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | shell | ||||||||
|
Shell.setCompletionFunction
|
|||||||||
Sets the current shell directory. Throws a error, if the directory are not exists. You can get the current shell directory with shell.dir. | |||||||||
Syntax | shell.setDir(
|
||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | shell | ||||||||
|
|
|||||||||
Set the Shellpath. The Shellpath is a list of folders, where the shell are searching for programs. The directories are separated with :. | |||||||||
Syntax | shell.setPath(
|
||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | shell | ||||||||
|
|
|||||||||
Switch to another multishell tab. This function only exists if multishell is enabled. | |||||||||
Syntax | shell.switchTab(
|
||||||||
Returns | nil | ||||||||
Part of | CC:Tweaked (source) | ||||||||
API | shell | ||||||||
|
This article is issued from Computercraft. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.