On Sun, 15 Oct 2023, 03:15 Ti Strga, <wearyofallthisc...@gmail.com> wrote:
> On Fri, Oct 13, 2023 at 5:59 PM Grisha Levit <grishale...@gmail.com> > wrote: > > IMHO you'd be better off just putting a `{` line at the start and `}` > line at the end of your scripts > The big weakness of the "{}" approach is that if a writer forgets to do > that, there's no way to detect it until a script is modified and the > running one crashes. But in the case of cloning, we can add such explicit > test-and-detection for "did you forget to trigger the cloning" in the few > scripts that really, really need it. > I think I would attack this from an entirely different angle: what about simply modifying Baeh so that it slurps in the entire file upon opening it? You could even hide that inside an LD_PRELOAD module so you don't have to recompile Bash, and so that it's inherited automatically. -Martin