forked from mirror/codesnap.nvim
13 lines
227 B
Lua
13 lines
227 B
Lua
|
local command_util = {}
|
||
|
|
||
|
function command_util.exec_command(command, mode)
|
||
|
local handle = assert(io.popen(command, mode))
|
||
|
local origin = assert(handle:read("*a"))
|
||
|
|
||
|
handle:close()
|
||
|
|
||
|
return origin
|
||
|
end
|
||
|
|
||
|
return command_util
|