From 142bbdd89e4d5bb62aea4469d1d2c24cf470afd8 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Thu, 1 Aug 2024 11:38:37 -0400 Subject: [PATCH] Bash-5.2 patch 32: fix printing coprocs when the coproc does not have a name --- patchlevel.h | 2 +- print_cmd.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/patchlevel.h b/patchlevel.h index db0de52d..12ad882f 100644 --- a/patchlevel.h +++ b/patchlevel.h @@ -25,6 +25,6 @@ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh looks for to find the patch level (for the sccs version string). */ -#define PATCHLEVEL 31 +#define PATCHLEVEL 32 #endif /* _PATCHLEVEL_H_ */ diff --git a/print_cmd.c b/print_cmd.c index b8154947..a16c2486 100644 --- a/print_cmd.c +++ b/print_cmd.c @@ -356,7 +356,9 @@ make_command_string_internal (command) break; case cm_coproc: - cprintf ("coproc %s ", command->value.Coproc->name); + cprintf ("coproc "); + if (command->value.Coproc->command->type != cm_simple) + cprintf ("%s ", command->value.Coproc->name); skip_this_indent++; make_command_string_internal (command->value.Coproc->command); break; -- 2.47.3