Blame SOURCES/bash-4.3-noecho.patch

bb9a7e
diff --git a/parse.y b/parse.y
bb9a7e
index df1231d..2449fa8 100644
bb9a7e
--- a/parse.y
bb9a7e
+++ b/parse.y
bb9a7e
@@ -4482,6 +4482,8 @@ xparse_dolparen (base, string, indp, flags)
bb9a7e
   save_parser_state (&ps);
bb9a7e
   save_input_line_state (&ls);
bb9a7e
   orig_eof_token = shell_eof_token;
bb9a7e
+  /* avoid echoing every substitution again */
bb9a7e
+  echo_input_at_read = 0;
bb9a7e
 #if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
bb9a7e
   saved_pushed_strings = pushed_string_list;	/* separate parsing context */
bb9a7e
   pushed_string_list = (STRING_SAVER *)NULL;
bb9a7e
diff --git a/subst.c b/subst.c
bb9a7e
index 9ccbf33..8a9ee5c 100644
bb9a7e
--- a/subst.c
bb9a7e
+++ b/subst.c
bb9a7e
@@ -9453,6 +9453,7 @@ param_expand (string, sindex, quoted, expanded_something,
bb9a7e
   WORD_LIST *list, *l;
bb9a7e
   WORD_DESC *tdesc, *ret;
bb9a7e
   int tflag, nullarg;
bb9a7e
+  int old_echo_input;
bb9a7e
 
bb9a7e
 /*itrace("param_expand: `%s' pflags = %d", string+*sindex, pflags);*/
bb9a7e
   zindex = *sindex;
bb9a7e
@@ -9843,6 +9844,9 @@ arithsub:
bb9a7e
 	}
bb9a7e
 
bb9a7e
 comsub:
bb9a7e
+      old_echo_input = echo_input_at_read;
bb9a7e
+      /* avoid echoing every substitution again */
bb9a7e
+      echo_input_at_read = 0;
bb9a7e
       if (pflags & PF_NOCOMSUB)
bb9a7e
 	/* we need zindex+1 because string[zindex] == RPAREN */
bb9a7e
 	temp1 = substring (string, *sindex, zindex+1);
bb9a7e
@@ -9855,6 +9859,7 @@ comsub:
bb9a7e
 	}
bb9a7e
       FREE (temp);
bb9a7e
       temp = temp1;
bb9a7e
+      echo_input_at_read = old_echo_input;
bb9a7e
       break;
bb9a7e
 
bb9a7e
     /* Do POSIX.2d9-style arithmetic substitution.  This will probably go