From a8ef7d73d7d6a5549df7354552ca5808f48ff7b1 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 16 Dec 2023 07:54:10 -0800 Subject: [PATCH] macos: do not load zsh config on the outer zsh launch Related to #1102, #1074 Because we are now using the built-in zsh on macOS to launch the real shell the user wants to use (see #1102 for why), this "outer zsh" process was consuming our shell integration setup. This commit adds flags so that this zsh instance doesn't load local zshrc files and therefore doesn't consume our shell integration setup. --- src/termio/Exec.zig | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/termio/Exec.zig b/src/termio/Exec.zig index 936b0cb4f..f54ac5e77 100644 --- a/src/termio/Exec.zig +++ b/src/termio/Exec.zig @@ -881,7 +881,14 @@ const Subprocess = struct { if (hush) try args.append("-q"); try args.append("-flp"); try args.append(username); + + // We execute zsh with "-d -f" so that it doesn't load any + // local zshrc files so that (1) our shell integration doesn't + // break and (2) user configuration doesn't mess this process + // up. try args.append("/bin/zsh"); + try args.append("-d"); + try args.append("-f"); try args.append("-c"); try args.append(cmd); break :args try args.toOwnedSlice();