mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3623: "$*" is expanded to "nonomatch"
Problem: "$*" is expanded to "nonomatch". Solution: Only add "set nonomatch" when using a csh-like shell. (Christian Brabandt, closes #9159, closes #9153)
This commit is contained in:
committed by
Bram Moolenaar
parent
64be6aa3a5
commit
8b8d829faf
@@ -6691,10 +6691,17 @@ mch_expand_wildcards(
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flags & EW_NOTFOUND)
|
||||
STRCPY(command, "set nonomatch; ");
|
||||
else
|
||||
STRCPY(command, "unset nonomatch; ");
|
||||
STRCPY(command, "");
|
||||
if (shell_style == STYLE_GLOB)
|
||||
{
|
||||
// Assume the nonomatch option is valid only for csh like shells,
|
||||
// otherwise, this may set the positional parameters for the shell,
|
||||
// e.g. "$*".
|
||||
if (flags & EW_NOTFOUND)
|
||||
STRCAT(command, "set nonomatch; ");
|
||||
else
|
||||
STRCAT(command, "unset nonomatch; ");
|
||||
}
|
||||
if (shell_style == STYLE_GLOB)
|
||||
STRCAT(command, "glob >");
|
||||
else if (shell_style == STYLE_PRINT)
|
||||
|
Reference in New Issue
Block a user