From 9ee30919f807678b0bc9f675dcfa73225b486574 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 29 Jan 2023 21:31:27 +0000 Subject: Debug: include variable content as expansion interim item --- src/src/expand.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/src/expand.c b/src/src/expand.c index 2949579c5..10f009ce2 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -4733,6 +4733,7 @@ while (*s) reset in the middle of the buffer will make it inaccessible. */ len = Ustrlen(value); + DEBUG(D_expand) debug_expansion_interim(US"value", value, len, !!(flags & ESI_SKIPPING)); if (!yield && newsize != 0) { yield = g; @@ -4751,7 +4752,10 @@ while (*s) int n; s = read_cnumber(&n, s); if (n >= 0 && n <= expand_nmax) + { + DEBUG(D_expand) debug_expansion_interim(US"value", expand_nstring[n], expand_nlength[n], !!(flags & ESI_SKIPPING)); yield = string_catn(yield, expand_nstring[n], expand_nlength[n]); + } continue; } @@ -4776,7 +4780,10 @@ while (*s) goto EXPAND_FAILED; } if (n >= 0 && n <= expand_nmax) + { + DEBUG(D_expand) debug_expansion_interim(US"value", expand_nstring[n], expand_nlength[n], !!(flags & ESI_SKIPPING)); yield = string_catn(yield, expand_nstring[n], expand_nlength[n]); + } continue; } -- cgit v1.2.1