From ComputerCraft Wiki
Revision as of 00:11, 8 July 2013 by AfterLifeLochie (Talk | contribs) (Actually explained what this function does.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Grid Redstone.png  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


Grid paper.png  Example
This code will return all set aliases and the programs they refer to.
for alias, programName in pairs(shell.aliases()) do
print(alias .. " => " .. programName)
mv => move
dir => list
cp => copy
rm => delete
ls => list