I've been poking around Ska.Shell to find a way to implement running in a "clean" shell without inheriting environment from the parent. In bash this is surprisingly difficult, with probably the best solution being /bin/env - /bin/bash in order to get a completely empty bash. Then you need to source /etc/profile to get any paths. I haven't looked at tcsh.
The current concept of the env kwarg in functions is strictly additive to the current environment, so implementing this feature in a fully back-compatible way isn't completely trivial and probably needs a new keyword arg.
Relevant to sot/astromon#2
I've been poking around
Ska.Shellto find a way to implement running in a "clean" shell without inheriting environment from the parent. In bash this is surprisingly difficult, with probably the best solution being/bin/env - /bin/bashin order to get a completely empty bash. Then you need to source /etc/profile to get any paths. I haven't looked at tcsh.The current concept of the
envkwarg in functions is strictly additive to the current environment, so implementing this feature in a fully back-compatible way isn't completely trivial and probably needs a new keyword arg.Relevant to sot/astromon#2