aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index d967e2b313..c760e762ee 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1812,6 +1812,7 @@ vim.system({cmd}, {opts}, {on_exit}) *vim.system()*
Return: ~
(`vim.SystemObj`) Object with the fields:
+ • cmd (string[]) Command name and args
• pid (integer) Process ID
• wait (fun(timeout: integer|nil): SystemCompleted) Wait for the
process to complete. Upon timeout the process is sent the KILL
@@ -2568,16 +2569,21 @@ vim.ui.open({path}) *vim.ui.open()*
Expands "~/" and environment variables in filesystem paths.
Examples: >lua
+ -- Asynchronous.
vim.ui.open("https://neovim.io/")
vim.ui.open("~/path/to/file")
- vim.ui.open("$VIMRUNTIME")
+ -- Synchronous (wait until the process exits).
+ local cmd, err = vim.ui.open("$VIMRUNTIME")
+ if cmd then
+ cmd:wait()
+ end
<
Parameters: ~
• {path} (`string`) Path or URL to open
Return (multiple): ~
- (`vim.SystemCompleted?`) Command result, or nil if not found.
+ (`vim.SystemObj?`) Command object, or nil if not found.
(`string?`) Error message on failure
See also: ~