Plumbing with cwd sounds interesting if it works reliably. I see that one has to configure ones shell specifically to output an escape code that the patched ST will recognize.
Question about the patch itself; why start a shell and construct a command that involves cd to change directory? Wouldn't a chdir() in the forked process suck less? Then exec plumber_cmd, sel.primary directly. Also the child pid variable seems unnecessary.