Make shit less ass fuck shit fuck ass shit ass bruh what is this code

This commit is contained in:
2026-06-06 19:00:37 +03:00
parent 202f6d42ac
commit 4d6dbadc32
87 changed files with 1497 additions and 954 deletions
+20 -9
View File
@@ -1,15 +1,26 @@
local directory = ...
local args = {...}
if args[2] then
terminal.write("\27[91mToo many arguments.\27[0m")
end
if not args[1] then
return
end
local fs = require("filesystem")
local shell = require("shell")
if not directory then
local directory = shell.resolvePath(args[1])
if not fs.exists(directory) then
terminal.write("\27[91mError: " .. directory .. ": No such file or directory\27[0m\n")
return
end
if directory:sub(1, 1) ~= "/" then
directory = fs.concat(shell.getWorkingDirectory(), directory)
end
if fs.exists(directory) and fs.isDirectory(directory) then
shell.setWorkingDirectory(fs.canonical(directory))
else
print("\27[91mNo such directory.")
if not fs.isDirectory(directory) then
terminal.write("\27[91mError: " .. directory .. ": Not a directory\27[0m\n")
return
end
shell.setWorkingDirectory(fs.canonical(directory))