diff options
| author | Lewis Russell <lewis6991@gmail.com> | 2023-09-05 21:50:18 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-05 21:50:18 +0100 |
| commit | 4ce9875feb7b61b46bcb299485cdb85fe80191d3 (patch) | |
| tree | a2845a292f085ecdc4897b349e403cd819e19ef2 /runtime/doc/lua.txt | |
| parent | c3e176f6e24e2b97603b59bb89b125d540e1274d (diff) | |
| parent | be8b15200d7093726b0999ccfd4a3e9952656d47 (diff) | |
| download | rneovim-4ce9875feb7b61b46bcb299485cdb85fe80191d3.tar.gz rneovim-4ce9875feb7b61b46bcb299485cdb85fe80191d3.tar.bz2 rneovim-4ce9875feb7b61b46bcb299485cdb85fe80191d3.zip | |
Merge pull request #25006 from lewis6991/fix/systemkill
`vim.system` fixes and improvements
Diffstat (limited to 'runtime/doc/lua.txt')
| -rw-r--r-- | runtime/doc/lua.txt | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index f5b3e56f61..71f001f4fc 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -1777,7 +1777,9 @@ vim.system({cmd}, {opts}, {on_exit}) *vim.system()* `fun(err: string, data: string)`. Defaults to `true`. • text: (boolean) Handle stdout and stderr as text. Replaces `\r\n` with `\n`. - • timeout: (integer) + • timeout: (integer) Run the command with a time limit. + Upon timeout the process is sent the TERM signal (15) and + the exit code is set to 124. • detach: (boolean) If true, spawn the child process in a detached state - this will make it a process group leader, and will effectively enable the child to keep @@ -1790,16 +1792,18 @@ vim.system({cmd}, {opts}, {on_exit}) *vim.system()* object, see return of SystemObj:wait(). Return: ~ - SystemObj Object with the fields: + vim.SystemObj Object with the fields: • pid (integer) Process ID - • wait (fun(timeout: integer|nil): SystemCompleted) + • wait (fun(timeout: integer|nil): SystemCompleted) Wait for the + process to complete. Upon timeout the process is sent the KILL + signal (9) and the exit code is set to 124. • SystemCompleted is an object with the fields: • code: (integer) • signal: (integer) • stdout: (string), nil if stdout argument is passed • stderr: (string), nil if stderr argument is passed - • kill (fun(signal: integer)) + • kill (fun(signal: integer|string)) • write (fun(data: string|nil)) Requires `stdin=true`. Pass `nil` to close the stream. • is_closing (fun(): boolean) @@ -2541,7 +2545,7 @@ vim.ui.open({path}) *vim.ui.open()* • {path} (string) Path or URL to open Return (multiple): ~ - SystemCompleted|nil Command result, or nil if not found. + vim.SystemCompleted|nil Command result, or nil if not found. (string|nil) Error message on failure See also: ~ |