lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> setmetatable(_G,{__index=function(...) return os.getenv(select(2,...)) end})

No need for select:

setmetatable(_G,{__index=function(t,k) return os.getenv(k) end})