We use subshells ($( ... ) and ( ... )) in a few places, and those behave like sub-processes wrt execution environment.
let cmd_wrapper c = (* wraps c with redirections *) in
....
cmd_wrapper "cd /tmp";
cmd_wrapper "pwd"; (* <- this is not in /tmp because the cmd_wrapper made a subshell that cancels the "cd" when finishing. *)
....
We use subshells (
$( ... )
and( ... )
) in a few places, and those behave like sub-processes wrt execution environment.How do/we document/warn about that?