URL:
  <https://savannah.gnu.org/bugs/?68735>

                 Summary: verbose mode only prints first one or two lines of
command/process substitutions
                   Group: The GNU Bourne-Again SHell
               Submitter: cubernetes
               Submitted: Fri 02 Oct 2026 01:33:41 PM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Unlocked


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Fri 02 Oct 2026 01:33:41 PM UTC By: cubernetes <cubernetes>
Reproducer:
```bash
env -i bash --norc --noprofile -c $'set -v\n. <(printf \': before\n: $(echo
one\necho two)\n: after\')'
```

Stdout (4 lines):
```
. <(printf ': before
: before
: $(echo one
: after

```

As you can see, the bug is actually happening twice right here:
Once for the process substitution, and another time for the forking command
substitution. It would also happen for the fork-free command substitution, but
I only have bash 5.3.9(1)-release on my system and there's a related bug that
prevents me from demonstrating it with fork-free command substitutions
(https://www.mail-archive.com/[email protected]/msg35972.html).

If and only if you follow the initial opening parenthesis of the substitution
with a backslash, you are able to extend the verbose printing to two lines
instead of just one:
```bash
env -i bash --norc --noprofile -c $'set -v\n. <(\\\nprintf \': before\n:
$(\\\necho one\necho two)\n: after\')'
```

Stdout (6 lines):
```
. <(\
printf ': before
: before
: $(\
echo one
: after

```

But no amount of backslashes would allow me to reach three lines, or put any
more characters between the parenthesis and the backslash.







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?68735>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature

Reply via email to