Re: funsub questions

2023-12-18 Thread Chet Ramey
On 12/17/23 10:47 PM, Zachary Santer wrote: As a follow-on question, why would this be implemented only now? From the very beginning, capturing the stdout of an external command involved forking a subshell, and soon (assuming funsubs remain when 5.3 is released) it won't have to. It feels like

Re: Job control: process running from pipe doesn't get focus

2023-12-18 Thread Chet Ramey
On 12/15/23 12:28 PM, Maksym Telychko wrote: Bash Version: 5.2 Patch Level: 21 Release Status: release Description: Process does not become foreground when run from a pipe. Repeat-By: Conditions are very special, and I am not sure who in the chain is cause of bug. In short

Re: issue with debug trap

2023-12-18 Thread Martin D Kealey
On Sat, 16 Dec 2023 at 07:21, Giacomo Comes wrote: > debugon () { > trap 'if (($?)); then echo "$((LINENO-1)): $(sed -n "$((LINENO-1))p" > "$0")" ; fi' DEBUG > } > debugoff () { > trap '' DEBUG > } > > Although LINENO is the command that's about to be executed, that does not imply that

Re: A feature request regarding redirection to variables

2023-12-18 Thread Oğuz
On Mon, Dec 18, 2023 at 7:39 AM Luke Tidd wrote: > > A very common thing I need to do when writing bash is to collect both > the stdout and stderr of a command. This can be done relatively > reasonably with files but it would be very attractive to be able to > redirect these directly to a