Debug: more detail for ${reduce...} ${map...} ${filter...}
authorJeremy Harris <jgh146exb@wizmail.org>
Tue, 12 Sep 2023 19:52:35 +0000 (20:52 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 1 Oct 2023 18:23:04 +0000 (19:23 +0100)
src/src/expand.c

index bcfa60fb660e1246c048bd808a7bc13fa4f33b8e..1d0ddec2a465ffc2a3a92d1f0df995fea121fb2a 100644 (file)
@@ -6564,6 +6564,7 @@ while (*s)
        goto EXPAND_FAILED_CURLY;                                       /*}*/
        }
 
+      DEBUG(D_expand) debug_printf_indent("%s: evaluate input list list\n", name);
       if (!(list = expand_string_internal(s,
              ESI_BRACE_ENDS | ESI_HONOR_DOLLAR | flags, &s, &resetok, NULL)))
        goto EXPAND_FAILED;                                             /*{{*/
@@ -6583,6 +6584,7 @@ while (*s)
          expand_string_message = US"missing '{' for second arg of reduce";
          goto EXPAND_FAILED_CURLY;                                     /*}*/
          }
+       DEBUG(D_expand) debug_printf_indent("reduce: initial result list\n");
         t = expand_string_internal(s,
              ESI_BRACE_ENDS | ESI_HONOR_DOLLAR | flags, &s, &resetok, NULL);
         if (!t) goto EXPAND_FAILED;
@@ -6610,6 +6612,7 @@ while (*s)
       condition for real. For EITEM_MAP and EITEM_REDUCE, do the same, using
       the normal internal expansion function. */
 
+      DEBUG(D_expand) debug_printf_indent("%s: find end of conditionn\n", name);
       if (item_type != EITEM_FILTER)
         temp = expand_string_internal(s,
          ESI_BRACE_ENDS | ESI_HONOR_DOLLAR | ESI_SKIPPING, &s, &resetok, NULL);