Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Unicode allowables in Environment variables



You beat me to it! I saw that part of the code this morning. I already jumped the gun though, so I wanted to hold off until I could connect the dots. It’s definitely on the program side. I will have to get back to this later, but I am glad we have a second data point.

Will

> On Nov 4, 2024, at 10:12, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> 
> On Mon, Nov 4, 2024 at 7:30 AM William DeShazer <earl.deshazer@xxxxxxxxx> wrote:
>> 
>> It gets mangled inside /etc/zshrc_Apple_Terminal which is kicked off by /etc/zshrc. This code section is intended to synchronize with the new feature to have the Terminal.app Title bar auto update. In an effort to come up with a safe URL path, by adding this to a zsh hook, this code is mangling ZDOTDIR.
> 
> I can confirm that executing /etc/zshrc_Apple_Terminal during startup
> appears to be messing up the local copy of the ZDOTDIR variable.
> Interestingly, the value in the environment is not affected, so the
> issue can be worked around by:
> 
> ZDOTDIR="$(printenv ZDOTDIR)"
> 
> This doesn't have anything to do with add-zsh-hook, it happens even if
> that function is not executed.  Even an empty file will reproduce
> this, and will do so on Ubuntu with the same sort of ZDOTDIR path.
> valgrind reports no memory sloppiness, and it doesn't happen with a
> random environment variable, so I think it's because ZDOTDIR is
> retrieved during startup with getsparam_u() which unmetafies-in-place
> the return value of getsparam() ... but I haven't tracked it any
> further than that.





Messages sorted by: Reverse Date, Date, Thread, Author