Blame SOURCES/bash-4.4-case-in-command-subst.patch

3fb13f
diff --git a/parse.y b/parse.y
3fb13f
--- a/parse.y
3fb13f
+++ b/parse.y
3fb13f
@@ -4011,11 +4011,13 @@ eof_error:
3fb13f
 		  tflags |= LEX_RESWDOK;
3fb13f
 		  lex_rwlen = 0;
3fb13f
 		}
3fb13f
-	       else
3fb13f
+	       else if (shellmeta (ch) == 0)
3fb13f
 		{
3fb13f
 		  tflags &= ~LEX_RESWDOK;
3fb13f
 /*itrace("parse_comsub:%d: found `%.4s', lex_reswdok -> 0", line_number, ret+retind-4);*/
3fb13f
 		}
3fb13f
+	      else	/* can't be in a reserved word any more */
3fb13f
+	        lex_rwlen = 0;
3fb13f
 	    }
3fb13f
 	  else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
3fb13f
 	    ;	/* don't modify LEX_RESWDOK if we're starting a comment */