It is never exported and should not be exported. It is set during shell startup—but only for interactive shells.seems like this variable is not exported to subshells by default. You can manually set it like this when calling your script
To manipulate any settings of the shell being called from, OP needs to write an alias or shell function, rather than an external script.
Statistics: Posted by jojopi — Thu Feb 19, 2026 3:33 pm