aboutsummaryrefslogtreecommitdiff
blob: 9e62a57fbf0865170eeae3a38464044716c9fa5b (plain)
1
2
3
4
5
6
7
-- read environment variables as if they were global variables

local f=function (t,i) return os.getenv(i) end
setmetatable(getfenv(),{__index=f})

-- an example
print(a,USER,PATH)