1
0
forked from aniani/vim

patch 8.2.3071: shell options are not set properly for PowerShell

Problem:    Shell options are not set properly for PowerShell.
Solution:   Use better option defaults. (Mike Willams, closes #8459)
This commit is contained in:
Mike Williams 2021-06-28 20:53:58 +02:00 committed by Bram Moolenaar
parent ffec6dd16a
commit 127950241e
9 changed files with 206 additions and 49 deletions

View File

@ -9878,9 +9878,11 @@ sha256({string}) *sha256()*
shellescape({string} [, {special}]) *shellescape()* shellescape({string} [, {special}]) *shellescape()*
Escape {string} for use as a shell command argument. Escape {string} for use as a shell command argument.
On MS-Windows, when 'shellslash' is not set, it will enclose On MS-Windows, when the 'shell' contains powershell then it
{string} in double quotes and double all double quotes within will enclose {string} in single quotes and will double up all
{string}. internal single quotes. With other values for 'shell' when
'shellslash' is not set, it will enclose {string} in double
quotes and double all double quotes within {string}.
Otherwise it will enclose {string} in single quotes and Otherwise it will enclose {string} in single quotes and
replace all "'" with "'\''". replace all "'" with "'\''".
@ -11040,7 +11042,8 @@ tempname() *tempname()* *temp-file-name*
:exe "redir > " . tmpfile :exe "redir > " . tmpfile
< For Unix, the file will be in a private directory |tempfile|. < For Unix, the file will be in a private directory |tempfile|.
For MS-Windows forward slashes are used when the 'shellslash' For MS-Windows forward slashes are used when the 'shellslash'
option is set or when 'shellcmdflag' starts with '-'. option is set or when 'shellcmdflag' starts with '-' except
when when 'shell' contains powershell.
term_ functions are documented here: |terminal-function-details| term_ functions are documented here: |terminal-function-details|

View File

@ -6594,23 +6594,25 @@ A jump table for the options with a short description can be found at |Q_op|.
*'shellcmdflag'* *'shcf'* *'shellcmdflag'* *'shcf'*
'shellcmdflag' 'shcf' string (default: "-c"; 'shellcmdflag' 'shcf' string (default: "-c";
Win32, when 'shell' does not contain "sh" Win32, when 'shell' contains "powershell":
"-Command", or when it does not contain "sh"
somewhere: "/c") somewhere: "/c")
global global
Flag passed to the shell to execute "!" and ":!" commands; e.g., Flag passed to the shell to execute "!" and ":!" commands; e.g.,
"bash.exe -c ls" or "cmd.exe /c dir". For MS-Windows, the default is "bash.exe -c ls", "powershell.exe -Command dir", or "cmd.exe /c dir".
set according to the value of 'shell', to reduce the need to set this For MS-Windows, the default is set according to the value of 'shell',
option by the user. to reduce the need to set this option by the user.
On Unix it can have more than one flag. Each white space separated On Unix it can have more than one flag. Each white space separated
part is passed as an argument to the shell command. part is passed as an argument to the shell command.
See |option-backslash| about including spaces and backslashes. See |option-backslash| about including spaces and backslashes.
Also see |dos-shell| for MS-Windows. Also see |dos-shell| and |dos-powershell| for MS-Windows.
This option cannot be set from a |modeline| or in the |sandbox|, for This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons. security reasons.
*'shellpipe'* *'sp'* *'shellpipe'* *'sp'*
'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee" or 'shellpipe' 'sp' string (default ">", ">%s 2>&1", "| tee", "|& tee"
"2>&1| tee") "2>&1| tee", or
"2>&1 | Out-File -Encoding default")
global global
{not available when compiled without the |+quickfix| {not available when compiled without the |+quickfix|
feature} feature}
@ -6620,9 +6622,10 @@ A jump table for the options with a short description can be found at |Q_op|.
The name of the temporary file can be represented by "%s" if necessary The name of the temporary file can be represented by "%s" if necessary
(the file name is appended automatically if no %s appears in the value (the file name is appended automatically if no %s appears in the value
of this option). of this option).
For the Amiga the default is ">". For MS-Windows the default is For the Amiga the default is ">". For MS-Windows using powershell the
">%s 2>&1". The output is directly saved in a file and not echoed to default is "2>&1 | Out-File -Encoding default", otherwise the default
the screen. is ">%s 2>&1". The output is directly saved in a file and not echoed
to the screen.
For Unix the default is "| tee". The stdout of the compiler is saved For Unix the default is "| tee". The stdout of the compiler is saved
in a file and echoed to the screen. If the 'shell' option is "csh" or in a file and echoed to the screen. If the 'shell' option is "csh" or
"tcsh" after initializations, the default becomes "|& tee". If the "tcsh" after initializations, the default becomes "|& tee". If the
@ -6645,8 +6648,9 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons. security reasons.
*'shellquote'* *'shq'* *'shellquote'* *'shq'*
'shellquote' 'shq' string (default: ""; Win32, when 'shell' 'shellquote' 'shq' string (default: ""; Win32, when 'shell' does not
contains "sh" somewhere: "\"") contain powershell but contains "sh"
somewhere: "\"")
global global
Quoting character(s), put around the command passed to the shell, for Quoting character(s), put around the command passed to the shell, for
the "!" and ":!" commands. The redirection is kept outside of the the "!" and ":!" commands. The redirection is kept outside of the
@ -6661,7 +6665,8 @@ A jump table for the options with a short description can be found at |Q_op|.
security reasons. security reasons.
*'shellredir'* *'srr'* *'shellredir'* *'srr'*
'shellredir' 'srr' string (default ">", ">&" or ">%s 2>&1") 'shellredir' 'srr' string (default ">", ">&", ">%s 2>&1", or
"2>&1 | Out-File -Encoding default")
global global
String to be used to put the output of a filter command in a temporary String to be used to put the output of a filter command in a temporary
file. See also |:!|. See |option-backslash| about including spaces file. See also |:!|. See |option-backslash| about including spaces
@ -6674,8 +6679,10 @@ A jump table for the options with a short description can be found at |Q_op|.
'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta", 'shell' option is "sh", "ksh", "mksh", "pdksh", "zsh", "zsh-beta",
"bash" or "fish", the default becomes ">%s 2>&1". This means that "bash" or "fish", the default becomes ">%s 2>&1". This means that
stderr is also included. For Win32, the Unix checks are done and stderr is also included. For Win32, the Unix checks are done and
additionally "cmd" is checked for, which makes the default ">%s 2>&1". additionally "cmd" is checked for, which makes the default ">%s 2>&1",
Also, the same names with ".exe" appended are checked for. and "powershell" is checked for which makes the default
"2>&1 | Out-File -Encoding default". Also, the same names with ".exe"
appended are checked for.
The initialization of this option is done after reading the ".vimrc" The initialization of this option is done after reading the ".vimrc"
and the other initializations, so that when the 'shell' option is set and the other initializations, so that when the 'shell' option is set
there, the 'shellredir' option changes automatically unless it was there, the 'shellredir' option changes automatically unless it was
@ -6690,9 +6697,9 @@ A jump table for the options with a short description can be found at |Q_op|.
global global
{only for MS-Windows} {only for MS-Windows}
When set, a forward slash is used when expanding file names. This is When set, a forward slash is used when expanding file names. This is
useful when a Unix-like shell is used instead of cmd.exe. Backward useful when a Unix-like shell is used instead of cmd.exe or
slashes can still be typed, but they are changed to forward slashes by powershell.exe. Backward slashes can still be typed, but they are
Vim. changed to forward slashes by Vim.
Note that setting or resetting this option has no effect for some Note that setting or resetting this option has no effect for some
existing file names, thus this option needs to be set before opening existing file names, thus this option needs to be set before opening
any file for best results. This might change in the future. any file for best results. This might change in the future.
@ -6746,6 +6753,8 @@ A jump table for the options with a short description can be found at |Q_op|.
*'shellxquote'* *'sxq'* *'shellxquote'* *'sxq'*
'shellxquote' 'sxq' string (default: ""; 'shellxquote' 'sxq' string (default: "";
for Win32, when 'shell' is cmd.exe: "(" for Win32, when 'shell' is cmd.exe: "("
for Win32, when 'shell' is
powershell.exe: "\""
for Win32, when 'shell' contains "sh" for Win32, when 'shell' contains "sh"
somewhere: "\"" somewhere: "\""
for Unix, when using system(): "\"") for Unix, when using system(): "\"")
@ -6758,11 +6767,12 @@ A jump table for the options with a short description can be found at |Q_op|.
then ')"' is appended. then ')"' is appended.
When the value is '(' then also see 'shellxescape'. When the value is '(' then also see 'shellxescape'.
This is an empty string by default on most systems, but is known to be This is an empty string by default on most systems, but is known to be
useful for on Win32 version, either for cmd.exe which automatically useful for on Win32 version, either for cmd.exe and powershell.exe
strips off the first and last quote on a command, or 3rd-party shells which automatically strips off the first and last quote on a command,
such as the MKS Korn Shell or bash, where it should be "\"". The or 3rd-party shells such as the MKS Korn Shell or bash, where it
default is adjusted according the value of 'shell', to reduce the need should be "\"". The default is adjusted according the value of
to set this option by the user. See |dos-shell|. 'shell', to reduce the need to set this option by the user. See
|dos-shell|.
This option cannot be set from a |modeline| or in the |sandbox|, for This option cannot be set from a |modeline| or in the |sandbox|, for
security reasons. security reasons.

View File

@ -17,6 +17,7 @@ versions of Vim. Also see |os_win32.txt| and |os_msdos.txt|.
7. Interrupting |dos-CTRL-Break| 7. Interrupting |dos-CTRL-Break|
8. Temp files |dos-temp-files| 8. Temp files |dos-temp-files|
9. Shell option default |dos-shell| 9. Shell option default |dos-shell|
10. PowerShell |dos-powershell|
============================================================================== ==============================================================================
1. File locations *dos-locations* 1. File locations *dos-locations*
@ -297,8 +298,46 @@ For Win32 as:
<shell> -c "command name >file" <shell> -c "command name >file"
For DOS 32 bit, DJGPP does this internally somehow. For DOS 32 bit, DJGPP does this internally somehow.
When starting up, Vim checks for the presence of "sh" anywhere in the 'shell' When starting up, if Vim does not recognise a standard Windows shell it checks
option. If it is present, Vim sets the 'shellcmdflag' and 'shellquote' or for the presence of "sh" anywhere in the 'shell' option. If it is present,
'shellxquote' options will be set as described above. Vim sets the 'shellcmdflag' and 'shellquote' or 'shellxquote' options will be
set as described above.
==============================================================================
10. PowerShell *dos-powershell*
Vim also supports Windows PowerShell. If 'shell' has been set to
"powershell.exe" at startup then VIM sets 'shellcmdflag', 'shellxquote',
'shellpipe', and 'shellredir' options to the following values:
'shellcmdflag' -Command
'shellxquote' "
'shellpipe' 2>&1 | Out-File -Encoding default
'shellredir' 2>&1 | Out-File -Encoding default
If you find that PowerShell commands are taking a long time to run then try
setting 'shellcmdflag' to "-NoProfile -Command". Note this will prevent any
PowerShell environment setup by the profile from taking place.
If you have problems running PowerShell scripts through the 'shell' then try
setting 'shellcmdflag' to "-ExecutionPolicy RemoteSigned -Command". See
online Windows documentation for more information on PowerShell Execution
Policy settings.
The 'shellpipe' and 'shellredir' option values re-encode the UTF-16le output
from Windows PowerShell to your currently configured console codepage. The
output can be forced into a different encoding by changing "default" to one of
the following:
unicode - UTF-16le (default output from PowerShell 5.1)
bigendianunicode - UTF-16
utf8 - UTF-8
utf7 - UTF-7 (no-BOM)
utf32 - UTF-32
ascii - 7-bit ASCII character set
default - System's active code page (typically ANSI)
oem - System's current OEM code page
Note Multi-byte Unicode encodings include a leading BOM.
vim:tw=78:ts=8:noet:ft=help:norl: vim:tw=78:ts=8:noet:ft=help:norl:

View File

@ -5245,9 +5245,10 @@ vim_tempname(
// Backslashes in a temp file name cause problems when filtering with // Backslashes in a temp file name cause problems when filtering with
// "sh". NOTE: This also checks 'shellcmdflag' to help those people who // "sh". NOTE: This also checks 'shellcmdflag' to help those people who
// didn't set 'shellslash'. // didn't set 'shellslash' but only if not using PowerShell.
retval = utf16_to_enc(itmp, NULL); retval = utf16_to_enc(itmp, NULL);
if (*p_shcf == '-' || p_ssl) if ((strstr((char *)gettail(p_sh), "powershell") == NULL
&& *p_shcf == '-') || p_ssl)
for (p = retval; *p; ++p) for (p = retval; *p; ++p)
if (*p == '\\') if (*p == '\\')
*p = '/'; *p = '/';

View File

@ -1396,7 +1396,9 @@ csh_like_shell(void)
/* /*
* Escape "string" for use as a shell argument with system(). * Escape "string" for use as a shell argument with system().
* This uses single quotes, except when we know we need to use double quotes * This uses single quotes, except when we know we need to use double quotes
* (MS-DOS and MS-Windows without 'shellslash' set). * (MS-DOS and MS-Windows not using PowerShell and without 'shellslash' set).
* PowerShell also uses a novel escaping for enclosed single quotes - double
* them up.
* Escape a newline, depending on the 'shell' option. * Escape a newline, depending on the 'shell' option.
* When "do_special" is TRUE also replace "!", "%", "#" and things starting * When "do_special" is TRUE also replace "!", "%", "#" and things starting
* with "<" like "<cfile>". * with "<" like "<cfile>".
@ -1412,6 +1414,10 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
char_u *escaped_string; char_u *escaped_string;
int l; int l;
int csh_like; int csh_like;
# ifdef MSWIN
int powershell;
int double_quotes;
# endif
// Only csh and similar shells expand '!' within single quotes. For sh and // Only csh and similar shells expand '!' within single quotes. For sh and
// the like we must not put a backslash before it, it will be taken // the like we must not put a backslash before it, it will be taken
@ -1419,12 +1425,18 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
// Csh also needs to have "\n" escaped twice when do_special is set. // Csh also needs to have "\n" escaped twice when do_special is set.
csh_like = csh_like_shell(); csh_like = csh_like_shell();
# ifdef MSWIN
// PowerShell only accepts single quotes so override p_ssl.
powershell = strstr((char *)gettail(p_sh), "powershell") != NULL;
double_quotes = !powershell && !p_ssl;
# endif
// First count the number of extra bytes required. // First count the number of extra bytes required.
length = (unsigned)STRLEN(string) + 3; // two quotes and a trailing NUL length = (unsigned)STRLEN(string) + 3; // two quotes and a trailing NUL
for (p = string; *p != NUL; MB_PTR_ADV(p)) for (p = string; *p != NUL; MB_PTR_ADV(p))
{ {
# ifdef MSWIN # ifdef MSWIN
if (!p_ssl) if (double_quotes)
{ {
if (*p == '"') if (*p == '"')
++length; // " -> "" ++length; // " -> ""
@ -1432,7 +1444,14 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
else else
# endif # endif
if (*p == '\'') if (*p == '\'')
length += 3; // ' => '\'' {
# ifdef MSWIN
if (powershell)
length +=2; // ' => ''
else
# endif
length += 3; // ' => '\''
}
if ((*p == '\n' && (csh_like || do_newline)) if ((*p == '\n' && (csh_like || do_newline))
|| (*p == '!' && (csh_like || do_special))) || (*p == '!' && (csh_like || do_special)))
{ {
@ -1455,7 +1474,7 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
// add opening quote // add opening quote
# ifdef MSWIN # ifdef MSWIN
if (!p_ssl) if (double_quotes)
*d++ = '"'; *d++ = '"';
else else
# endif # endif
@ -1464,7 +1483,7 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
for (p = string; *p != NUL; ) for (p = string; *p != NUL; )
{ {
# ifdef MSWIN # ifdef MSWIN
if (!p_ssl) if (double_quotes)
{ {
if (*p == '"') if (*p == '"')
{ {
@ -1478,10 +1497,20 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
# endif # endif
if (*p == '\'') if (*p == '\'')
{ {
*d++ = '\''; # ifdef MSWIN
*d++ = '\\'; if (powershell)
*d++ = '\''; {
*d++ = '\''; *d++ = '\'';
*d++ = '\'';
}
else
# endif
{
*d++ = '\'';
*d++ = '\\';
*d++ = '\'';
*d++ = '\'';
}
++p; ++p;
continue; continue;
} }
@ -1507,7 +1536,7 @@ vim_strsave_shellescape(char_u *string, int do_special, int do_newline)
// add terminating quote and finish with a NUL // add terminating quote and finish with a NUL
# ifdef MSWIN # ifdef MSWIN
if (!p_ssl) if (double_quotes)
*d++ = '"'; *d++ = '"';
else else
# endif # endif

View File

@ -932,6 +932,27 @@ set_init_3(void)
options[idx_srr].def_val[VI_DEFAULT] = p_srr; options[idx_srr].def_val[VI_DEFAULT] = p_srr;
} }
} }
# ifdef MSWIN
// PowerShell 5.1/.NET outputs UTF-16 with BOM so re-encode to the
// current codepage
else if ( fnamecmp(p, "powershell") == 0
|| fnamecmp(p, "powershell.exe") == 0
)
{
# if defined(FEAT_QUICKFIX)
if (do_sp)
{
p_sp = (char_u *)"2>&1 | Out-File -Encoding default";
options[idx_sp].def_val[VI_DEFAULT] = p_sp;
}
# endif
if (do_srr)
{
p_srr = (char_u *)"2>&1 | Out-File -Encoding default";
options[idx_srr].def_val[VI_DEFAULT] = p_srr;
}
}
#endif
else else
// Always use POSIX shell style redirection if we reach this // Always use POSIX shell style redirection if we reach this
if ( fnamecmp(p, "sh") == 0 if ( fnamecmp(p, "sh") == 0
@ -984,11 +1005,35 @@ set_init_3(void)
* Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the * Set 'shellcmdflag', 'shellxquote', and 'shellquote' depending on the
* 'shell' option. * 'shell' option.
* This is done after other initializations, where 'shell' might have been * This is done after other initializations, where 'shell' might have been
* set, but only if they have not been set before. Default for p_shcf is * set, but only if they have not been set before.
* "/c", for p_shq is "". For "sh" like shells it is changed here to * Default values depend on shell (cmd.exe is default shell):
* "-c" and "\"". And for Win32 we need to set p_sxq instead. *
* p_shcf p_sxq
* cmd.exe - "/c" "("
* powershell.exe - "-Command" "\""
* "sh" like shells - "-c" "\""
*
* For Win32 p_sxq is set instead of p_shq to include shell redirection.
*/ */
if (strstr((char *)gettail(p_sh), "sh") != NULL) if (strstr((char *)gettail(p_sh), "powershell") != NULL)
{
int idx_opt;
idx_opt = findoption((char_u *)"shcf");
if (idx_opt >= 0 && !(options[idx_opt].flags & P_WAS_SET))
{
p_shcf = (char_u*)"-Command";
options[idx_opt].def_val[VI_DEFAULT] = p_shcf;
}
idx_opt = findoption((char_u *)"sxq");
if (idx_opt >= 0 && !(options[idx_opt].flags & P_WAS_SET))
{
p_sxq = (char_u*)"\"";
options[idx_opt].def_val[VI_DEFAULT] = p_sxq;
}
}
else if (strstr((char *)gettail(p_sh), "sh") != NULL)
{ {
int idx3; int idx3;

View File

@ -2142,7 +2142,8 @@ executable_exists(char *name, char_u **path, int use_path, int use_pathext)
return FALSE; return FALSE;
// Using the name directly when a Unix-shell like 'shell'. // Using the name directly when a Unix-shell like 'shell'.
if (strstr((char *)gettail(p_sh), "sh") != NULL) if (strstr((char *)gettail(p_sh), "powershell") == NULL
&& strstr((char *)gettail(p_sh), "sh") != NULL)
noext = TRUE; noext = TRUE;
if (use_pathext) if (use_pathext)

View File

@ -24,8 +24,10 @@ func Test_shell_options()
if has('win32') if has('win32')
let shells += [['cmd', '/c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', ''], let shells += [['cmd', '/c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', ''],
\ ['cmd.exe', '/c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '('], \ ['cmd.exe', '/c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '('],
\ ['powershell.exe', '-c', '>', '', '>', '"&|<>()@^', '"'], \ ['powershell.exe', '-Command', '2>&1 | Out-File -Encoding default',
\ ['powershell', '-c', '>', '', '>', '"&|<>()@^', '"'], \ '', '2>&1 | Out-File -Encoding default', '"&|<>()@^', '"'],
\ ['powershell', '-Command', '2>&1 | Out-File -Encoding default', '',
\ '2>&1 | Out-File -Encoding default', '"&|<>()@^', '"'],
\ ['sh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'], \ ['sh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
\ ['ksh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'], \ ['ksh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
\ ['mksh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'], \ ['mksh.exe', '-c', '>%s 2>&1', '', '>%s 2>&1', '"&|<>()@^', '"'],
@ -58,6 +60,9 @@ func Test_shell_options()
if e[0] =~# '.*csh$' || e[0] =~# '.*csh.exe$' if e[0] =~# '.*csh$' || e[0] =~# '.*csh.exe$'
let str1 = "'cmd \"arg1\" '\\''arg2'\\'' \\!%#'" let str1 = "'cmd \"arg1\" '\\''arg2'\\'' \\!%#'"
let str2 = "'cmd \"arg1\" '\\''arg2'\\'' \\\\!\\%\\#'" let str2 = "'cmd \"arg1\" '\\''arg2'\\'' \\\\!\\%\\#'"
elseif e[0] =~# '.*powershell$' || e[0] =~# '.*powershell.exe$'
let str1 = "'cmd \"arg1\" ''arg2'' !%#'"
let str2 = "'cmd \"arg1\" ''arg2'' \\!\\%\\#'"
else else
let str1 = "'cmd \"arg1\" '\\''arg2'\\'' !%#'" let str1 = "'cmd \"arg1\" '\\''arg2'\\'' !%#'"
let str2 = "'cmd \"arg1\" '\\''arg2'\\'' \\!\\%\\#'" let str2 = "'cmd \"arg1\" '\\''arg2'\\'' \\!\\%\\#'"
@ -135,6 +140,28 @@ func Test_shellescape()
let &shell = save_shell let &shell = save_shell
endfunc endfunc
" Test for 'shellslash'
func Test_shellslash()
CheckOption shellslash
let save_shellslash = &shellslash
" The shell and cmdflag, and expected slash in tempname with shellslash set or
" unset. The assert checks the file separator before the leafname.
" ".*\\\\[^\\\\]*$"
let shells = [['cmd', '/c', '\\', '/'],
\ ['powershell', '-Command', '\\', '/'],
\ ['sh', '-c', '/', '/']]
for e in shells
exe 'set shell=' .. e[0] .. ' | set shellcmdflag=' .. e[1]
set noshellslash
let file = tempname()
call assert_match('^.\+' .. e[2] .. '[^' .. e[2] .. ']\+$', file, e[0] .. ' ' .. e[1] .. ' nossl')
set shellslash
let file = tempname()
call assert_match('^.\+' .. e[3] .. '[^' .. e[3] .. ']\+$', file, e[0] .. ' ' .. e[1] .. ' ssl')
endfor
let &shellslash = save_shellslash
endfunc
" Test for 'shellxquote' " Test for 'shellxquote'
func Test_shellxquote() func Test_shellxquote()
CheckUnix CheckUnix

View File

@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
3071,
/**/ /**/
3070, 3070,
/**/ /**/