open url based on OS
This commit is contained in:
parent
6cf21bf121
commit
d8dc7e067c
3 changed files with 22 additions and 3 deletions
10
lua/telescope/_extensions/getOS.lua
Normal file
10
lua/telescope/_extensions/getOS.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue