nvim_runtime_lua

uv.spawn.options

Fields9

options.args : string[] | nil

Command line arguments as a list of strings. The first string should not be the path to the program, since that is already provided via path. On Windows, this uses CreateProcess which concatenates the arguments into a string. This can cause some strange errors (see options.verbatim below for Windows).

options.stdio : {integer, integer | uv.uv_stream_t | nil} | nil

Set the file descriptors that will be made available to the child process. The convention is that the first entries are stdin, stdout, and stderr.

The entries can take many shapes.

  • If integer, then the child process inherits that same zero-indexed
  • fd from the parent process.

  • If uv_stream_t handles are passed in, those are used as a read-write pipe
  • or inherited stream depending if the stream has a valid fd.

  • If nil, means to ignore that fd in the child process.

Note: On Windows, file descriptors after the third are available to the child process only if the child processes uses the MSVCRT runtime.

options.env : string[] | nil

Set environment variables for the new process. Each entry should be a string in the form of NAME=VALUE.

options.cwd : nil | string

Set the current working directory for the sub-process.

options.uid : nil | string

Set the child process' user id.

options.gid : nil | string

Set the child process' group id.

options.verbatim : nil | boolean

If true, do not wrap any arguments in quotes, or perform any other escaping, when converting the argument list into a command line string. This option is only meaningful on Windows systems. On Unix it is silently ignored.

options.detached : nil | 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 running after the parent exits. Note that the child process will still keep the parent's event loop alive unless the parent process calls uv.unref() on the child's process handle.

options.hide : nil | boolean

If true, hide the subprocess console window that would normally be created. This option is only meaningful on Windows systems. On Unix it is silently ignored.