diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2017-09-30 21:31:31 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-03-24 22:05:53 +0100 |
commit | 131aad953c007d382cbff1d2560471b29975da87 (patch) | |
tree | c9c319d332050ed3c67bd3570f5213471a9e3af2 /src | |
parent | be67d926c5eec3b90cf906471f4b81ed21223c1f (diff) | |
download | rneovim-131aad953c007d382cbff1d2560471b29975da87.tar.gz rneovim-131aad953c007d382cbff1d2560471b29975da87.tar.bz2 rneovim-131aad953c007d382cbff1d2560471b29975da87.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/options.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nvim/options.lua b/src/nvim/options.lua index 34ff810410..d653147943 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -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', |