From: Chet Ramey Date: Thu, 1 Aug 2024 15:38:37 +0000 (-0400) Subject: Bash-5.2 patch 32: fix printing coprocs when the coproc does not have a name X-Git-Tag: bash-5.3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=142bbdd89e4d5bb62aea4469d1d2c24cf470afd8;p=thirdparty%2Fbash.git Bash-5.2 patch 32: fix printing coprocs when the coproc does not have a name --- 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;