On 8/26/24 6:31 PM, Justin Su wrote:
I am using Ghostty terminal on macOS Sonoma. Ghostty appends itself to MANPATH on startup, so zsh inherits MANPATH as:
:/Applications/Ghostty.app/Contents/Resources/ghostty/../man
After zsh inits, MANPATH is:
/usr/share/man:/usr/local/share/man:/Applications/Ghostty.app/Contents/Resources/ghostty/../man:
That is, zsh changes MANPATH so that Ghostty is prepended, instead of appended.
This happens with no zsh user configuration. Please help me understand why this is happening, as I do not think this is correct behaviour.
Please cc me on all replies. Thanks in advance.
% grep -ri MANPATH Src
Src/init.c: manpath = mkarray(NULL);
Src/params.c: **manpath, /* $manpath */
Src/params.c:IPDEF8("MANPATH", &manpath, "manpath", PM_TIED),
Src/params.c:IPDEF9("manpath", &manpath, "MANPATH", PM_TIED),
outside of making $manpath tied to $MANPATH, zsh doesn't do anything with MANPATH.
So it is indeed configuration related, possibly done by your os vendor.