From 856acf4a518e6f34da5a6c5040eebf956038734d Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 16 Nov 2016 14:13:17 +0900 Subject: [PATCH] Update plugins.md --- runtime/help/plugins.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime/help/plugins.md b/runtime/help/plugins.md index 5a35a56a..eb616366 100644 --- a/runtime/help/plugins.md +++ b/runtime/help/plugins.md @@ -90,12 +90,16 @@ as Go's GOOS variable, so `darwin`, `windows`, `linux`, `freebsd`...) * `ByteOffset(loc Loc, buf *Buffer) int`: exactly like `ToCharPos` except it it counts bytes instead of runes. -* `JobStart(cmd string, onStdout, onStderr, onExit string, userargs ...string)`: - Starts running the given shell command in the background. `onStdout` `onStderr` and `onExit` +* `JobSpawn(cmdName string, cmdArgs []string, onStdout, onStderr, onExit string, userargs ...string)`: + Starts running the given process in the background. `onStdout` `onStderr` and `onExit` are callbacks to lua functions which will be called when the given actions happen to the background process. `userargs` are the arguments which will get passed to the callback functions +* `JobStart(cmd string, onStdout, onStderr, onExit string, userargs ...string)`: + Starts running the given shell command in the background. + This function is a shorthand for `JobSpawn`. + * `JobSend(cmd *exec.Cmd, data string)`: send a string into the stdin of the job process * `JobStop(cmd *exec.Cmd)`: kill a job