2017-01-06 13:41:12 +00:00
|
|
|
diff --git a/parse.y b/parse.y
|
|
|
|
--- a/parse.y
|
|
|
|
+++ b/parse.y
|
2022-10-04 08:27:14 +00:00
|
|
|
@@ -4255,7 +4255,8 @@ xparse_dolparen (base, string, indp, flags)
|
|
|
|
|
2014-07-30 14:35:23 +00:00
|
|
|
save_parser_state (&ps);
|
|
|
|
save_input_line_state (&ls);
|
2022-10-04 08:27:14 +00:00
|
|
|
-
|
2014-07-30 14:35:23 +00:00
|
|
|
+ /* avoid echoing every substitution again */
|
|
|
|
+ echo_input_at_read = 0;
|
2019-02-13 16:57:17 +00:00
|
|
|
#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
|
|
|
|
pushed_string_list = (STRING_SAVER *)NULL;
|
2022-10-04 08:27:14 +00:00
|
|
|
#endif
|
2017-01-06 13:41:12 +00:00
|
|
|
diff --git a/subst.c b/subst.c
|
|
|
|
--- a/subst.c
|
|
|
|
+++ b/subst.c
|
2022-10-04 08:27:14 +00:00
|
|
|
@@ -10222,6 +10222,7 @@ param_expand (string, sindex, quoted, expanded_something,
|
2021-01-06 09:48:34 +00:00
|
|
|
WORD_LIST *list, *l;
|
2014-07-30 14:35:23 +00:00
|
|
|
WORD_DESC *tdesc, *ret;
|
2021-01-06 09:48:34 +00:00
|
|
|
int tflag, nullarg;
|
2014-07-30 14:35:23 +00:00
|
|
|
+ int old_echo_input;
|
|
|
|
|
2017-01-06 13:41:12 +00:00
|
|
|
/*itrace("param_expand: `%s' pflags = %d", string+*sindex, pflags);*/
|
2014-07-30 14:35:23 +00:00
|
|
|
zindex = *sindex;
|
2022-10-04 08:27:14 +00:00
|
|
|
@@ -10614,6 +10615,9 @@ arithsub:
|
2014-07-30 14:35:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
comsub:
|
|
|
|
+ old_echo_input = echo_input_at_read;
|
|
|
|
+ /* avoid echoing every substitution again */
|
|
|
|
+ echo_input_at_read = 0;
|
|
|
|
if (pflags & PF_NOCOMSUB)
|
|
|
|
/* we need zindex+1 because string[zindex] == RPAREN */
|
|
|
|
temp1 = substring (string, *sindex, zindex+1);
|
2022-10-04 08:27:14 +00:00
|
|
|
@@ -10626,6 +10630,7 @@ comsub:
|
2014-07-30 14:35:23 +00:00
|
|
|
}
|
|
|
|
FREE (temp);
|
|
|
|
temp = temp1;
|
|
|
|
+ echo_input_at_read = old_echo_input;
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* Do POSIX.2d9-style arithmetic substitution. This will probably go
|