lots and LOTS of stuff
i lost track sorry
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
local shell = require("shell")
|
||||
local fs = require("filesystem")
|
||||
local args = {...}
|
||||
local command = args[1]
|
||||
@@ -11,8 +12,9 @@ if not command then
|
||||
print(data)
|
||||
return
|
||||
end
|
||||
if shell.aliases[command] then
|
||||
command = shell.aliases[command]
|
||||
local aliases = shell.getAliases()
|
||||
if aliases[command] then
|
||||
command = aliases[command]
|
||||
end
|
||||
if fs.exists("/halyde/apps/helpdb/" .. command .. ".txt") then
|
||||
local handle, data, tmpdata = fs.open("/halyde/apps/helpdb/" .. command .. ".txt", "r"), "", nil
|
||||
@@ -21,7 +23,7 @@ if fs.exists("/halyde/apps/helpdb/" .. command .. ".txt") then
|
||||
data = data .. (tmpdata or "")
|
||||
until not tmpdata
|
||||
print(data)
|
||||
local aliases = table.copy(shell.aliases)
|
||||
-- local aliases = table.copy(shell.aliases)
|
||||
if table.find(aliases, command) then
|
||||
local aliasIndex = table.find(aliases, command)
|
||||
local aliasString = "Aliases:\n " .. aliasIndex
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
All default Halyde shell commands:
|
||||
argentum Uses the Argentum package manager.
|
||||
cat Concatenates and prints a file.
|
||||
cd Changes directory.
|
||||
clear Clears the screen.
|
||||
cp Copies a file.
|
||||
download Downloads a file from the internet.
|
||||
echo Prints a message.
|
||||
edit Opens the text editor.
|
||||
fetch Displays system information.
|
||||
help Shows this.
|
||||
ls Lists files.
|
||||
lscor Lists coroutines.
|
||||
lua Starts the Lua shell.
|
||||
mkdir Makes a directory.
|
||||
mv Moves/renames a file.
|
||||
reboot Reboots the computer.
|
||||
rm Deletes a file.
|
||||
shutdown Shuts down the computer.
|
||||
argentum Uses the Argentum package manager.
|
||||
boot Boots to another OS.
|
||||
cat Concatenates and prints a file.
|
||||
cd Changes directory.
|
||||
clear Clears the screen.
|
||||
cp Copies a file.
|
||||
download Downloads a file from the internet.
|
||||
echo Prints a message.
|
||||
edit Opens the text editor.
|
||||
fetch Displays system information.
|
||||
help Shows this.
|
||||
label Labels storage devices and EEPROMS.
|
||||
ls Lists files.
|
||||
lscor Lists coroutines.
|
||||
lua Starts the Lua shell.
|
||||
mkdir Makes a directory.
|
||||
mv Moves/renames a file.
|
||||
reboot Reboots the computer.
|
||||
resolution Sets the resolution.
|
||||
rm Deletes a file.
|
||||
shutdown Shuts down the computer.
|
||||
|
||||
You can get additional information on any app or command by running:
|
||||
help [COMMAND]
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
print("\27[44m".._VERSION.."\27[0m shell")
|
||||
print('Type "exit" to exit.')
|
||||
terminal.readHistory["lua"] = {""}
|
||||
-- terminal.readHistory["lua"] = {""}
|
||||
local fs = require("filesystem")
|
||||
|
||||
local loadedLibraries = ""
|
||||
@@ -15,7 +15,7 @@ while true do
|
||||
local command = terminal.read("lua", "\27[44mlua>\27[0m ")
|
||||
if command == "exit" then
|
||||
return
|
||||
else
|
||||
elseif command~="" then
|
||||
local function runCommand()
|
||||
local func = load(loadedLibraries.."return "..command,"=stdin") or load(loadedLibraries..command,"=stdin")
|
||||
local res = {assert(func)()}
|
||||
|
||||
Reference in New Issue
Block a user