Skip to content

fix(shell): prevent zsh startup recursion#10

Merged
pld merged 1 commit intopld:mainfrom
ukanga:cpu-load-recursion-issue
Apr 27, 2026
Merged

fix(shell): prevent zsh startup recursion#10
pld merged 1 commit intopld:mainfrom
ukanga:cpu-load-recursion-issue

Conversation

@ukanga
Copy link
Copy Markdown
Collaborator

@ukanga ukanga commented Apr 27, 2026

Summary

  • Fix zsh shells from recursively re-sourcing the temporary wrapper startup files.
  • Re-source startup files from _WT_ORIG_ZDOTDIR instead of the overridden ZDOTDIR.
  • Add a regression test that asserts the wrapper uses the original dotdir path.

Validation

  • cargo fmt --check
  • cargo test
  • Manual wt new demo verification in zsh

Notes

This fixes the regression introduced in 49d0a3c (fix(shell): restore ZDOTDIR and source full zsh startup chain #3).

Closes #9

@ukanga ukanga requested a review from pld April 27, 2026 11:04
@ukanga ukanga force-pushed the cpu-load-recursion-issue branch from f69d6b3 to cfec41f Compare April 27, 2026 11:47
Restore the original zsh dotdir early, keep the compdef shim in an
autoloadable functions path, and reapply the wt prompt prefix after
framework initialization.

Add a black-box regression test that runs `wt new` through a real zsh
startup path and asserts there are no compdef errors.
@ukanga ukanga force-pushed the cpu-load-recursion-issue branch from cfec41f to ab9f00e Compare April 27, 2026 12:18
@pld pld merged commit 8cab231 into pld:main Apr 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zsh startup recurses in wt shells

2 participants