Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-14 Thread Chet Ramey
On 11/14/24 2:28 PM, #!microsuxx wrote: maybe set -a 'd help ? if it can backwards export the vars No. A child process can't affect its parent's environment without inventing some kind of IPC. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita bre

Re: [PATCH] lib/readline/doc makefiles clean targets

2024-11-14 Thread Chet Ramey
On 11/14/24 4:23 AM, Mike Jonkmans wrote: On Mon, Nov 11, 2024 at 03:30:53PM -0500, Chet Ramey wrote: 6) There is redundancy/duplication in the actions of various rules; OK. 6) Same for the definitions of variables. Examples? There is duplication in the top Makefile on the various lib sou

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-14 Thread #!microsuxx
maybe set -a 'd help ? if it can backwards export the vars On Thu, Nov 14, 2024, 3:01 PM Chet Ramey wrote: > On 11/13/24 4:48 PM, Yuri wrote: > > > The first 'source' command didn't set variables set or exported in the > > child.sh script, even though 'source' is executed in the current > script

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-14 Thread #!microsuxx
aidd , thxx .. ++ On Thu, Nov 14, 2024, 8:45 PM Chet Ramey wrote: > On 11/14/24 2:28 PM, #!microsuxx wrote: > > maybe set -a 'd help ? > > if it can backwards export the vars > > No. A child process can't affect its parent's environment without inventing > some kind of IPC. > > -- > ``The lyf so

Re: [PATCH] lib/readline/doc makefiles clean targets

2024-11-14 Thread Mike Jonkmans
On Mon, Nov 11, 2024 at 03:30:53PM -0500, Chet Ramey wrote: > On 11/8/24 4:15 PM, Mike Jonkmans wrote: > > > > 2) The use of recursive make, makes it harder to do dependencies right; > > > It's the best way to build using optional components and subdirectories. > > I have my doubts here. There are

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-14 Thread Chet Ramey
On 11/13/24 4:48 PM, Yuri wrote: The first 'source' command didn't set variables set or exported in the child.sh script, even though 'source' is executed in the current script's context, The `source' command isn't "executed in the current script's context." It is executed in a subshell, whic

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-14 Thread Chet Ramey
On 11/13/24 5:12 PM, Yuri wrote: On 11/13/24 14:02, Greg Wooledge wrote: The commands within a pipeline are executed in subshells (child processes), so all variable changes are discarded when the subshell exits. This sounds like an implementation detail that should be invisible that affects

Re: The 'source x' command doesn't keep variables set by x when source output is piped into other command

2024-11-14 Thread Chet Ramey
On 11/13/24 11:40 PM, Martin D Kealey wrote: The fact that pipeline components are implicitly run in subshells is arguably not highlighted well enough, but it IS stated that all components of a pipeline run in parallel, so it is logically deducible that this must involve separate processes. Th