spaces->tab, equipper improvements, supertreefarm rewrite, follow improvements, sensor cleanup, milo multiple items allowed in recipes, remote canvas access

This commit is contained in:
kepler155c@gmail.com
2019-06-18 15:23:20 -04:00
parent 3b9b509429
commit 045b32884f
162 changed files with 20448 additions and 20286 deletions

View File

@@ -4,28 +4,28 @@ local fs = require("shellex.filesystem")
local args = shell.parse(...)
local ec = 0
if #args == 0 then
args = {"-"}
args = {"-"}
end
for i = 1, #args do
local arg = shell.resolve(args[i])
if fs.isDirectory(arg) then
io.stderr:write(string.format('cat %s: Is a directory\n', arg))
ec = 1
else
local file, reason = fs.open(arg)
if not file then
io.stderr:write(string.format("cat: %s: %s\n", args[i], tostring(reason)))
ec = 1
else
local chunk = file.readAll()
file:close()
if chunk then
io.write(chunk)
io.write('\n')
end
end
end
local arg = shell.resolve(args[i])
if fs.isDirectory(arg) then
io.stderr:write(string.format('cat %s: Is a directory\n', arg))
ec = 1
else
local file, reason = fs.open(arg)
if not file then
io.stderr:write(string.format("cat: %s: %s\n", args[i], tostring(reason)))
ec = 1
else
local chunk = file.readAll()
file:close()
if chunk then
io.write(chunk)
io.write('\n')
end
end
end
end
return ec