From 592e023441b49ee4296ec8dc892928faf05099c6 Mon Sep 17 00:00:00 2001 From: sawka Date: Sat, 10 Feb 2024 19:34:56 -0300 Subject: [PATCH] backport zdotdir fix to v0.6.x release --- waveshell/pkg/shellapi/zshapi.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/waveshell/pkg/shellapi/zshapi.go b/waveshell/pkg/shellapi/zshapi.go index 2b4cdf841..ac8000cb9 100644 --- a/waveshell/pkg/shellapi/zshapi.go +++ b/waveshell/pkg/shellapi/zshapi.go @@ -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") }