diff options
author | Rui Abreu Ferreira <raf-ep@gmx.com> | 2017-03-28 16:03:53 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-04-12 02:10:34 +0200 |
commit | f3cc843755a6d638ada77dc31721aa53b3ff2364 (patch) | |
tree | ec2a760337b8d700ae7398feea43230e5b762ca8 /runtime | |
parent | 799443c9942fa145320d9cc7c4638bdaa8c8d67a (diff) | |
download | rneovim-f3cc843755a6d638ada77dc31721aa53b3ff2364.tar.gz rneovim-f3cc843755a6d638ada77dc31721aa53b3ff2364.tar.bz2 rneovim-f3cc843755a6d638ada77dc31721aa53b3ff2364.zip |
win: libuv_process_spawn(): special-case cmd.exe
Disable CommandLineToArgvW-standard quoting for cmd.exe.
libuv assumes spawned processes follow the convention expected by
CommandLineToArgvW(). But cmd.exe is non-conformant, so for cmd.exe:
- With system([]), the caller has full control (and responsibility) to
quote arguments correctly.
- With system(''), shell* options are used.
libuv quoting is disabled if argv[0] is:
- cmd.exe
- cmd
- $COMSPEC resolving to a path with filename cmd.exe
Closes #6329
References #6387
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/eval.txt | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 1ed919a241..aa979ae42c 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -4852,16 +4852,18 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()* Spawns {cmd} as a job. If {cmd} is a |List| it is run directly. If {cmd} is a |String| it is processed like this: > :call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}']) -< NOTE: This only shows the idea; see |shell-unquoting| before - constructing lists with 'shell' or 'shellcmdflag'. - - 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']) -< +< (Only shows the idea; see |shell-unquoting| for full details.) + + NOTE: on Windows if {cmd} is a List: + - cmd[0] must be executable. If it 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), extension is required: > + :call jobstart(['System32\ping.exe', 'neovim.io']) +< - {cmd} is quoted per the convention expected by + CommandLineToArgvW https://msdn.microsoft.com/bb776391 + unless the first argument is some form of "cmd.exe". + {opts} is a dictionary with these keys: on_stdout: stdout event handler (function name or |Funcref|) on_stderr: stderr event handler (function name or |Funcref|) |