blob: e169d18467148886c3ebc76380b73fe7a9bb7efd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
local M = {}
function M.raw(raw_script)
return function (server, on_exit)
local shell = vim.o.shell
vim.o.shell = "/bin/bash"
vim.cmd [[new]]
vim.fn.termopen(
"set -e;\n" .. raw_script,
{
cwd = server._root_dir,
on_exit = on_exit
}
)
vim.o.shell = shell
vim.cmd([[startinsert]]) -- so that the buffer tails the term log nicely
end
end
return M
|