This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
FREAX/bin/cd

15 lines
319 B
Text
Raw Normal View History

2022-07-18 19:33:40 +02:00
local tArgs = { ... }
if #tArgs < 1 then
local programName = arg[0] or fs.getName(shell.getRunningProgram())
print("Usage: " .. programName .. " <path>")
return
end
local sNewDir = shell.resolve(tArgs[1])
if fs.isDir(sNewDir) then
shell.setDir(sNewDir)
else
print("Not a directory")
return
end