backport zdotdir fix to v0.6.x release

This commit is contained in:
sawka 2024-02-10 19:34:56 -03:00
parent 51ee7bef61
commit 592e023441

View File

@ -257,10 +257,7 @@ func (z zshShellApi) MakeRcFileStr(pk *packet.RunPacketType) string {
}
rcBuf.WriteString("\n")
}
if shellenv.FindVarDecl(varDecls, "ZDOTDIR") == nil {
rcBuf.WriteString("unset ZDOTDIR\n")
rcBuf.WriteString("\n")
}
// do NOT unset ZDOTDIR, otherwise initialization will start to read initialization files from ~/ again
for _, varName := range ZshUnsetVars {
rcBuf.WriteString("unset " + shellescape.Quote(varName) + "\n")
}