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