Duplicate "stdin" (#40)

This commit was merged in pull request #40.
This commit is contained in:
devomaa
2020-07-01 07:40:31 +03:00
committed by GitHub
parent cd0e6af55f
commit cb1126e216

View File

@@ -4,7 +4,10 @@ local fs = require("shellex.filesystem")
local args = shell.parse(...) local args = shell.parse(...)
local ec = 0 local ec = 0
if #args == 0 then if #args == 0 then
args = {"-"} while true do
local input = read()
print(input)
end
end end
for i = 1, #args do for i = 1, #args do
@@ -28,4 +31,4 @@ for i = 1, #args do
end end
end end
return ec return ec