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