Difference between revisions of "Shell.aliases"
From ComputerCraft Wiki
SuicidalSTDz (Talk | contribs) |
m (Actually explained what this function does.) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
|name=shell.aliases | |name=shell.aliases | ||
|api=Shell | |api=Shell | ||
− | |returns=A table containing default and | + | |returns=A table containing default and user-specified program aliases. |
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc=Returns a table containing the default aliases and user specified aliases | + | |desc=Returns a table containing the default aliases and any user-specified aliases. The key of each entry is the 'alias name', and the value the physical program. |
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=This code will return all set aliases | + | |desc=This code will return all set aliases and the programs they refer to. |
− | |code= for | + | |code= for alias, programName in pairs(shell.aliases()) do<br/> print(alias .. " => " .. programName)<br/>end |
− | }} | + | |output=<pre>mv => move |
+ | dir => list | ||
+ | cp => copy | ||
+ | rm => delete | ||
+ | ls => list</pre>}} | ||
}} | }} | ||
+ | |||
[[Category:API_Functions]] | [[Category:API_Functions]] |
Latest revision as of 00:11, 8 July 2013
Function shell.aliases | |
Returns a table containing the default aliases and any user-specified aliases. The key of each entry is the 'alias name', and the value the physical program. | |
Syntax | shell.aliases() |
Returns | A table containing default and user-specified program aliases. |
Part of | ComputerCraft |
API | Shell |