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