mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-30 00:49:57 +02:00
commit bash-20170407 snapshot
This commit is contained in:
+18
-2
@@ -3389,7 +3389,7 @@ execute_case_command (case_command)
|
||||
WORD_LIST *wlist, *es;
|
||||
PATTERN_LIST *clauses;
|
||||
char *word, *pattern;
|
||||
int retval, match, ignore_return, save_line_number;
|
||||
int retval, match, ignore_return, save_line_number, qflags;
|
||||
|
||||
save_line_number = line_number;
|
||||
line_number = case_command->line;
|
||||
@@ -3441,7 +3441,15 @@ execute_case_command (case_command)
|
||||
es = expand_word_leave_quoted (list->word, 0);
|
||||
|
||||
if (es && es->word && es->word->word && *(es->word->word))
|
||||
pattern = quote_string_for_globbing (es->word->word, QGLOB_CVTNULL);
|
||||
{
|
||||
qflags = QGLOB_CVTNULL;
|
||||
/* We left CTLESC in place quoting CTLESC after the call to
|
||||
expand_word_leave_quoted; tell quote_string_for_globbing to
|
||||
remove those here */
|
||||
if ((list->word->flags & W_QUOTED) == 0)
|
||||
qflags |= QGLOB_CTLESC;
|
||||
pattern = quote_string_for_globbing (es->word->word, qflags);
|
||||
}
|
||||
else
|
||||
{
|
||||
pattern = (char *)xmalloc (1);
|
||||
@@ -5689,6 +5697,7 @@ execute_intern_function (name, funcdef)
|
||||
FUNCTION_DEF *funcdef;
|
||||
{
|
||||
SHELL_VAR *var;
|
||||
char *t;
|
||||
|
||||
if (check_identifier (name, posixly_correct) == 0)
|
||||
{
|
||||
@@ -5700,6 +5709,13 @@ execute_intern_function (name, funcdef)
|
||||
return (EXECUTION_FAILURE);
|
||||
}
|
||||
|
||||
if (strchr (name->word, CTLESC)) /* WHY? */
|
||||
{
|
||||
t = dequote_escapes (name->word);
|
||||
free (name->word);
|
||||
name->word = t;
|
||||
}
|
||||
|
||||
/* Posix interpretation 383 */
|
||||
if (posixly_correct && find_special_builtin (name->word))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user