Have HandleShellCommand return the stdout

HandleShellCommand will now return the stdout as a string and
it also takes an additional flag indicating whether it should
wait before closing the shell and returning to the editor.
This commit is contained in:
Zachary Yedidia
2016-09-06 19:27:57 -04:00
parent 94465ef1ae
commit dce56a2b85
5 changed files with 27 additions and 14 deletions

View File

@@ -80,7 +80,7 @@ You can do that by putting the following in `init.lua`:
function gorun()
local buf = CurView().Buf -- The current buffer
if buf:FileType() == "go" then
HandleShellCommand("go run " .. buf.Path, true) -- true means don't run it in the background
HandleShellCommand("go run " .. buf.Path, true, true) -- the first true means don't run it in the background
end
end