mirror of
https://github.com/neovim/neovim.git
synced 2025-09-11 22:08:18 +00:00
win: defaults: 'shellcmdflag', 'shellxquote' #7343
closes #7698 Wrapping a command in double-quotes allows cmd.exe to safely dequote the entire command as if the user entered the entire command in an interactive prompt. This reduces the need to escape nested and uneven double quotes. The `/s` flag of cmd.exe makes the behaviour more reliable: :set shellcmdflag=/s\ /c Before this patch, cmd.exe cannot use cygwin echo.exe (as opposed to cmd.exe `echo` builtin) even if it is wrapped in double quotes. Example: :: internal echo > cmd /s /c " echo foo\:bar" " foo\:bar" :: cygwin echo.exe > cmd /s /c " "echo" foo\:bar" " foo:bar
This commit is contained in:

committed by
Justin M. Keyes

parent
be67d926c5
commit
131aad953c
@@ -2048,7 +2048,7 @@ return {
|
||||
varname='p_shcf',
|
||||
defaults={
|
||||
condition='WIN32',
|
||||
if_true={vi="/c"},
|
||||
if_true={vi="/s /c"},
|
||||
if_false={vi="-c"}
|
||||
}
|
||||
},
|
||||
@@ -2104,7 +2104,11 @@ return {
|
||||
secure=true,
|
||||
vi_def=true,
|
||||
varname='p_sxq',
|
||||
defaults={if_true={vi=""}}
|
||||
defaults={
|
||||
condition='WIN32',
|
||||
if_true={vi="\""},
|
||||
if_false={vi=""},
|
||||
}
|
||||
},
|
||||
{
|
||||
full_name='shellxescape', abbreviation='sxe',
|
||||
|
Reference in New Issue
Block a user