Difference between revisions of "Shell.setAlias"

From ComputerCraft Wiki
Jump to: navigation, search
(Added function page)
 
m (Changed program argument from optional to required. My bad.)
Line 1: Line 1:
 
{{Function
 
{{Function
 
  |name=shell.setAlias
 
  |name=shell.setAlias
  |args= {{type|string}} alias [, {{type|string}} program]
+
  |args= {{type|string}} alias, {{type|string}} program
 
  |api=shell
 
  |api=shell
 
  |returns=[[nil]]
 
  |returns=[[nil]]

Revision as of 02:11, 12 May 2013

Grid Redstone.png  Function shell.setAlias
Sets an alias.
Syntax shell.setAlias(string alias, string program)
Returns nil
Part of ComputerCraft
API shell

Examples

Grid paper.png  Example
Sets the alias for program "startup".
Code
shell.setAlias("start", "startup")

Additional Notes

  • It does not output anything, it just sets the alias.