nofork command substitution

2023-05-15 Thread Chet Ramey
The latest devel branch push has the initial implementation of `nofork' command substitution. The excerpt from the info manual describing it is appended. Please test it out, and find the places I missed. Thanks. Chet == There is an alternate form of command substitution: ${C CO

Re: nofork command substitution

2023-05-15 Thread Oğuz İsmail Uysal
On 5/15/23 8:35 PM, Chet Ramey wrote: Please test it out     $ cat     ^Z     [1]+  Stopped cat     $ x=${ fg;}     foo     foo     <^C or ^D here>     $ declare -p x     declare -- x="cat"     $ Is this intended?

Re: nofork command substitution

2023-05-15 Thread Chet Ramey
On 5/15/23 2:42 PM, Oğuz İsmail Uysal wrote: On 5/15/23 8:35 PM, Chet Ramey wrote: Please test it out     $ cat     ^Z     [1]+  Stopped cat     $ x=${ fg;}     foo     foo     <^C or ^D here>     $ declare -p x     declare -- x="cat"     $ Is this intended? So far

Re: nofork command substitution

2023-05-15 Thread Oğuz İsmail Uysal
On 5/15/23 9:51 PM, Chet Ramey wrote: Everything is shared between the comsub and its caller, with a couple of documented exceptions. So it's just like calling `fg' in the current execution environment, but capturing the output. Oh, okay then. Thanks. How about this?     $ declare -i x     $ y

Re: nofork command substitution

2023-05-15 Thread Chet Ramey
On 5/15/23 2:54 PM, Oğuz İsmail Uysal wrote: On 5/15/23 9:51 PM, Chet Ramey wrote: Everything is shared between the comsub and its caller, with a couple of documented exceptions. So it's just like calling `fg' in the current execution environment, but capturing the output. Oh, okay then. Thanks