shell.exit

From ComputerCraft Wiki
Jump to: navigation, search


Grid Redstone.png  Function shell.exit
Causes the shell to terminate after the current script has finished execution, which will generally lead to the system shutting down. Note that it does not cause the currently executing script to exit. When using multiple tabs via multishell, will only halt the shell in the current tab. Compare os.shutdown(), which causes an immediate system shutdown.
Syntax shell.exit()
Returns None
Part of ComputerCraft
API shell

Examples

Grid paper.png  Example
Current shell will exit once this code has finished execution.
Code
shell.exit()
print("Press any key to exit shell...")
os.pullEvent("char")