Blame SOURCES/bash-4.2-noecho.patch

ff19ae
--- bash-4.2/parse.y	2014-05-29 14:46:09.545543384 +0200
ff19ae
+++ bash-4.2/parse.y	2014-05-29 14:48:40.758626213 +0200
ff19ae
@@ -3858,6 +3858,8 @@ xparse_dolparen (base, string, indp, fla
ff19ae
     sflags |= SEVAL_NOLONGJMP;
ff19ae
   save_parser_state (&ps);
ff19ae
   save_input_line_state (&ls);
ff19ae
+  /* avoid echoing every substitution again */
ff19ae
+  echo_input_at_read = 0;
ff19ae
 
ff19ae
   /*(*/
ff19ae
   parser_state |= PST_CMDSUBST|PST_EOFTOKEN;	/* allow instant ')' */ /*(*/
ff19ae
--- bash-4.2/subst.c	2014-05-29 16:04:35.802784549 +0200
ff19ae
+++ bash-4.2/subst.c	2014-05-29 16:08:25.021942676 +0200
ff19ae
@@ -7103,6 +7103,7 @@ param_expand (string, sindex, quoted, ex
ff19ae
   WORD_LIST *list;
ff19ae
   WORD_DESC *tdesc, *ret;
ff19ae
   int tflag;
ff19ae
+  int old_echo_input;
ff19ae
 
ff19ae
   zindex = *sindex;
ff19ae
   c = string[++zindex];
ff19ae
@@ -7401,6 +7402,9 @@ arithsub:
ff19ae
 	}
ff19ae
 
ff19ae
 comsub:
ff19ae
+      old_echo_input = echo_input_at_read;
ff19ae
+      /* avoid echoing every substitution again */
ff19ae
+      echo_input_at_read = 0;
ff19ae
       if (pflags & PF_NOCOMSUB)
ff19ae
 	/* we need zindex+1 because string[zindex] == RPAREN */
ff19ae
 	temp1 = substring (string, *sindex, zindex+1);
ff19ae
@@ -7413,6 +7417,7 @@ comsub:
ff19ae
 	}
ff19ae
       FREE (temp);
ff19ae
       temp = temp1;
ff19ae
+      echo_input_at_read = old_echo_input;
ff19ae
       break;
ff19ae
 
ff19ae
     /* Do POSIX.2d9-style arithmetic substitution.  This will probably go