mirror of
https://github.com/neovim/neovim.git
synced 2024-12-26 14:11:15 -07:00
d31d177a0c
Calling cmd.exe in Windows follows a very different pattern from Vim. The primary difference is that Vim does a nested call to cmd.exe, e.g. the following call in Vim system('echo a 2>&1') spawns the following processes "C:\Program Files (x86)\Vim\vim80\vimrun" -s C:\Windows\system32\cmd.exe /c (echo a 2^>^&1 ^>C:\Users\dummy\AppData\Local\Temp\VIoC169.tmp 2^>^&1) C:\Windows\system32\cmd.exe /c C:\Windows\system32\cmd.exe /c (echo a 2^>^&1 ^>C:\Users\dummy\AppData\Local\Temp\VIo3C6C.tmp 2^>^&1) C:\Windows\system32\cmd.exe /c (echo a 2>&1 >C:\Users\dummy\AppData\Local\Temp\VIo3C6C.tmp 2>&1) The escaping with ^ is needed because cmd.exe calls itself and needs to preserve the special metacharacters for the last call. However in nvim no nested call is made, system('') spawns a single cmd.exe process. Setting shellxescape to "" disables escaping with ^. The previous default for shellxquote=( wrapped any command in parenthesis, in Vim this is more meaningful due to the use of tempfiles to store the output and redirection (also see &shellquote). There is a slight benefit in having the default be empty because some expressions that run in console will not run within parens e.g. due to unbalanced double quotes system('echo "a b') |
||
---|---|---|
.. | ||
api_functions_spec.lua | ||
backtick_expansion_spec.lua | ||
buf_functions_spec.lua | ||
changedtick_spec.lua | ||
container_functions_spec.lua | ||
executable_spec.lua | ||
execute_spec.lua | ||
glob_spec.lua | ||
has_spec.lua | ||
hostname_spec.lua | ||
input_spec.lua | ||
json_functions_spec.lua | ||
let_spec.lua | ||
match_functions_spec.lua | ||
minmax_functions_spec.lua | ||
modeline_spec.lua | ||
msgpack_functions_spec.lua | ||
null_spec.lua | ||
operators_spec.lua | ||
printf_spec.lua | ||
reltime_spec.lua | ||
server_spec.lua | ||
setpos_spec.lua | ||
sort_spec.lua | ||
special_vars_spec.lua | ||
string_spec.lua | ||
system_spec.lua | ||
timer_spec.lua | ||
vvar_event_spec.lua | ||
writefile_spec.lua |