commit bash-20181207 snapshot

This commit is contained in:
Chet Ramey
2018-12-10 10:07:15 -05:00
parent 3669b0bacc
commit 9d80be9ab5
21 changed files with 830 additions and 934 deletions
+14
View File
@@ -894,6 +894,16 @@ select_command: SELECT WORD newline_list DO list DONE
$$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
if (word_top > 0) word_top--;
}
| SELECT WORD newline_list IN list_terminator newline_list DO compound_list DONE
{
$$ = make_select_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]);
if (word_top > 0) word_top--;
}
| SELECT WORD newline_list IN list_terminator newline_list '{' compound_list '}'
{
$$ = make_select_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]);
if (word_top > 0) word_top--;
}
;
case_command: CASE WORD newline_list IN newline_list ESAC
@@ -3020,7 +3030,11 @@ special_case_tokens (tokstr)
{
/* Posix grammar rule 6 */
if ((last_read_token == WORD) &&
#if defined (SELECT_COMMAND)
((token_before_that == FOR) || (token_before_that == CASE) || (token_before_that == SELECT)) &&
#else
((token_before_that == FOR) || (token_before_that == CASE)) &&
#endif
(tokstr[0] == 'i' && tokstr[1] == 'n' && tokstr[2] == 0))
{
if (token_before_that == CASE)