On Mon, Feb 26, 2024, at 9:07 PM, Christoph Anton Mitterer wrote: > The consequence of that is at least, that one has no chance to fully > unset these variables and even if they loose their value, they’ll be > exported to executed commands, possibly altering their behaviour. They are not exported. % env -i /opt/local/bin/dash $ export MAIL=v $ unset -v MAIL $ export export MAIL export PWD='/private/tmp' $ env PWD=/private/tmp Their local counterparts are not exported, either. % env -i /opt/local/bin/dash $ f() { local FOO=v; export FOO; unset -v FOO; export; env; } $ f export FOO export PWD='/private/tmp' PWD=/private/tmp -- vq