v0.8.1 - Fixed a couple bugs involving the shell crashing and fetch. Added proper shell error handling.

This commit is contained in:
TheWahlolly
2025-04-27 20:00:06 +03:00
parent 614c9011cf
commit f478048976
8 changed files with 37 additions and 4 deletions
+3
View File
@@ -3,6 +3,9 @@ local directory = args[1]
args = nil
local fs = import("filesystem")
if not directory then
return
end
if directory == ".." then
local backDirectory = shell.workingDirectory:match("(.+)/.-/")
if backDirectory then
+4
View File
@@ -3,6 +3,10 @@ local fromFile, toFile = args[1], args[2]
args = nil
local fs = import("filesystem")
if not fromFile or not toFile then
shell.run("help cp")
return
end
if fromFile:sub(1, 1) ~= "/" then
fromFile = shell.workingDirectory .. fromFile
end
+2 -1
View File
@@ -1,4 +1,5 @@
termlib.cursorPosY = termlib.cursorPosY + 2
print("")
print("")
print(" \27[93m┌┬┐ ┌┐ ┌┐ \n ││├─┤├┬┬┘├─┐\n │┐├┘││││││││\n ││││││││││┌┤\n └┴┴─┴┼┐├─┴─┘\n └─┘ ")
termlib.cursorPosX, termlib.cursorPosY = 17, termlib.cursorPosY - 8
print("\27[92mOS\27[0m: ".._OSVERSION)
+4
View File
@@ -3,6 +3,10 @@ local fromFile, toFile = args[1], args[2]
args = nil
local fs = import("filesystem")
if not fromFile or not toFile then
shell.run("help mv")
return
end
if fromFile:sub(1, 1) ~= "/" then
fromFile = shell.workingDirectory .. fromFile
end
+4
View File
@@ -3,6 +3,10 @@ local file = args[1]
args = nil
local fs = import("filesystem")
if not file then
shell.run("help rm")
return
end
if file:sub(1, 1) ~= "/" then
file = shell.workingDirectory .. file
end