Skip to content

Fix slow shell startup and PATH - #23

Merged
DROOdotFOO merged 5 commits into
mainfrom
fix-shell-startup
Oct 4, 2026
Merged

DROOdotFOO merged 5 commits into
mainfrom
fix-shell-startup

Conversation

@DROOdotFOO

Copy link
Copy Markdown
Owner

Summary

  • Startup hang (~10s): stale zsh history.LOCK files left by killed shells made each new shell wait for the lock. setopt HIST_FCNTL_LOCK uses kernel locks that die with the process.
  • ssh.zsh (~120s): find /private/tmp walked large repo checkouts; replaced with a one-level glob.
  • .zprofile: brew shellenv cached (335ms → 17ms), regenerated when brew updates.
  • PATH: add_to_path now splits colon lists (Homebrew was never added); build_path keeps entries set earlier (foundry, orbstack); typeset -gU PATH path dedupes.
  • fastfetch: pink axolotl logo.

Note: Homebrew git, python3, jq, openssl, etc. now come before the system versions.

Manual testing

  • Time to first prompt in a pty: 10-11s → ~0.3s; planted stale lock no longer delays
  • Fresh, nested and double-nested shells: identical 26-entry PATH, no duplicates
  • brew, orb resolve on PATH
  • Axolotl renders beside system info in Ghostty

- ssh.zsh: glob launchd socket instead of find over /private/tmp
- .zprofile: cache brew shellenv output
- env.zsh: HIST_FCNTL_LOCK so stale history locks can't stall startup ~10s
add_to_path splits colon lists; build_path keeps entries set before it; typeset -gU dedupes.
@DROOdotFOO
DROOdotFOO merged commit 3b0c43b into main Oct 4, 2026
5 checks passed
@DROOdotFOO
DROOdotFOO deleted the fix-shell-startup branch October 4, 2026 02:04
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.

1 participant