rcolebaugh / rpms / bash

Forked from rpms/bash a year ago
Clone

Blame SOURCES/bash-4.3-noecho.patch

50ece2
diff --git a/parse.y b/parse.y
50ece2
index 30425a5..85f1c4f 100644
50ece2
--- a/parse.y
50ece2
+++ b/parse.y
50ece2
@@ -4228,6 +4228,8 @@ xparse_dolparen (base, string, indp, flags)
50ece2
   save_parser_state (&ps);
50ece2
   save_input_line_state (&ls);
50ece2
   orig_eof_token = shell_eof_token;
50ece2
+  /* avoid echoing every substitution again */
50ece2
+  echo_input_at_read = 0;
50ece2
 
50ece2
   /*(*/
50ece2
   parser_state |= PST_CMDSUBST|PST_EOFTOKEN;	/* allow instant ')' */ /*(*/
50ece2
diff --git a/subst.c b/subst.c
50ece2
index f1a4df1..a93a4ce 100644
50ece2
--- a/subst.c
50ece2
+++ b/subst.c
50ece2
@@ -8513,6 +8513,7 @@ param_expand (string, sindex, quoted, expanded_something,
50ece2
   WORD_LIST *list;
50ece2
   WORD_DESC *tdesc, *ret;
50ece2
   int tflag;
50ece2
+  int old_echo_input;
50ece2
 
50ece2
 /*itrace("param_expand: `%s' pflags = %d", string+*sindex, pflags);*/
50ece2
   zindex = *sindex;
50ece2
@@ -8831,6 +8832,9 @@ arithsub:
50ece2
 	}
50ece2
 
50ece2
 comsub:
50ece2
+      old_echo_input = echo_input_at_read;
50ece2
+      /* avoid echoing every substitution again */
50ece2
+      echo_input_at_read = 0;
50ece2
       if (pflags & PF_NOCOMSUB)
50ece2
 	/* we need zindex+1 because string[zindex] == RPAREN */
50ece2
 	temp1 = substring (string, *sindex, zindex+1);
50ece2
@@ -8843,6 +8847,7 @@ comsub:
50ece2
 	}
50ece2
       FREE (temp);
50ece2
       temp = temp1;
50ece2
+      echo_input_at_read = old_echo_input;
50ece2
       break;
50ece2
 
50ece2
     /* Do POSIX.2d9-style arithmetic substitution.  This will probably go
50ece2
-- 
50ece2
2.9.3
50ece2