The issue is that Ghostty shell-integration tries to parse PS1. How we're
defining it now, the precmd function from Ghostty does not properly read
the newlines, resulting in broken prompts. This doesn't happen if:
- Zsh is reloaded (`omz reload` or `exec zsh`)
- Ghostty shell integration is disabled (`shell-integration = none` in config)
This fix just removes the newlines, and it's enough to fix the integration.
By default, `typeset` defines variables locally unless in the main scope.
This is specially bad when using `omz plugin load`, which happens inside
a function, so the declared variables don't continue being defined when
the function finishes and the main scope reappears.