mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Windows: libuv_process_spawn(): Allow libuv argument quoting/escaping.
Closes #5360
References #3305
Reverts commit dc9652e68d
.
Disabling the quoting was does not solve the problem in general, and
we would end up having to handle the quoting ourselves.
See: https://github.com/JuliaLang/julia/issues/13776
This commit is contained in:
parent
8a5962023f
commit
a05ebf4a2d
@ -4666,11 +4666,16 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()*
|
|||||||
Spawns {cmd} as a job. If {cmd} is a |List| it is run
|
Spawns {cmd} as a job. If {cmd} is a |List| it is run
|
||||||
directly. If {cmd} is a |String| it is processed like this: >
|
directly. If {cmd} is a |String| it is processed like this: >
|
||||||
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
|
:call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}'])
|
||||||
< NOTE: read |shell-unquoting| before constructing any lists
|
< NOTE: This only shows the idea; see |shell-unquoting| before
|
||||||
with 'shell' or 'shellcmdflag' options. The above call is
|
constructing lists with 'shell' or 'shellcmdflag'.
|
||||||
only written to show the idea, one needs to perform unquoting
|
|
||||||
and do split taking quotes into account.
|
|
||||||
|
|
||||||
|
NOTE: On Windows if {cmd} is a List, cmd[0] must be a valid
|
||||||
|
executable (.exe, .com). If the executable is in $PATH it can
|
||||||
|
be called by name, with or without an extension: >
|
||||||
|
:call jobstart(['ping', 'neovim.io'])
|
||||||
|
< If it is a path (not a name), it must include the extension: >
|
||||||
|
:call jobstart(['System32\ping.exe', 'neovim.io'])
|
||||||
|
<
|
||||||
{opts} is a dictionary with these keys:
|
{opts} is a dictionary with these keys:
|
||||||
on_stdout: stdout event handler (function name or |Funcref|)
|
on_stdout: stdout event handler (function name or |Funcref|)
|
||||||
on_stderr: stderr event handler (function name or |Funcref|)
|
on_stderr: stderr event handler (function name or |Funcref|)
|
||||||
@ -7099,9 +7104,8 @@ synstack({lnum}, {col}) *synstack()*
|
|||||||
valid positions.
|
valid positions.
|
||||||
|
|
||||||
system({cmd} [, {input}]) *system()* *E677*
|
system({cmd} [, {input}]) *system()* *E677*
|
||||||
Get the output of the shell command {cmd} as a |string|. {cmd}
|
Get the output of {cmd} as a |string| (use |systemlist()| to
|
||||||
will be run the same as in |jobstart()|. See |systemlist()|
|
get a |List|). {cmd} is treated exactly as in |jobstart()|.
|
||||||
to get the output as a |List|.
|
|
||||||
Not to be used for interactive commands.
|
Not to be used for interactive commands.
|
||||||
|
|
||||||
If {input} is a string it is written to a pipe and passed as
|
If {input} is a string it is written to a pipe and passed as
|
||||||
|
@ -19,8 +19,7 @@ bool libuv_process_spawn(LibuvProcess *uvproc)
|
|||||||
Process *proc = (Process *)uvproc;
|
Process *proc = (Process *)uvproc;
|
||||||
uvproc->uvopts.file = proc->argv[0];
|
uvproc->uvopts.file = proc->argv[0];
|
||||||
uvproc->uvopts.args = proc->argv;
|
uvproc->uvopts.args = proc->argv;
|
||||||
uvproc->uvopts.flags = UV_PROCESS_WINDOWS_HIDE
|
uvproc->uvopts.flags = UV_PROCESS_WINDOWS_HIDE;
|
||||||
| UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS;
|
|
||||||
if (proc->detach) {
|
if (proc->detach) {
|
||||||
uvproc->uvopts.flags |= UV_PROCESS_DETACHED;
|
uvproc->uvopts.flags |= UV_PROCESS_DETACHED;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user