Skip to content

Commit 03152cc

Browse files
corrupt952claude
andcommitted
perf(wezterm): pre-resolve WEZTERM_HOSTNAME to skip a hostname fork per prompt
wezterm.sh's __wezterm_user_vars_precmd hook forks `hostname` on every prompt when WEZTERM_HOSTNAME is unset. Setting it once at shell start avoids that repeated fork. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent c7ff564 commit 03152cc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

modules/wezterm/default.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
{
44
home.packages = [ pkgs.jetbrains-mono ];
55

6+
# wezterm.sh's precmd hook forks `hostname` on every prompt when this is
7+
# unset. Pre-resolving it here means the fork happens once per shell start.
8+
home.sessionVariables = {
9+
WEZTERM_HOSTNAME = "\${WEZTERM_HOSTNAME:-$(hostname)}";
10+
};
11+
612
programs.wezterm = {
713
enable = true;
814
enableZshIntegration = true;

0 commit comments

Comments
 (0)