http-codes.nvim/lua/telescope/_extensions/getOS.lua
2023-02-13 23:37:17 +00:00

10 lines
231 B
Lua

return function()
-- ask LuaJIT first
if jit then return jit.os end
-- Unix, Linux variants
local fh, _ = assert(io.popen('uname -o 2>/dev/null', 'r'))
if fh then return fh:read() end
return 'Windows'
end