Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save felipebernardes/a6fe8684dfed2a8c1f0ab8c6f13506a5 to your computer and use it in GitHub Desktop.

Select an option

Save felipebernardes/a6fe8684dfed2a8c1f0ab8c6f13506a5 to your computer and use it in GitHub Desktop.
Prompt for speeding up terminal start-up time
My terminal feels slow to open. Audit my ~/.zshrc and make it start faster.
1. Measure first: time `zsh -i -c exit` a few times, then time each slow-looking
piece on its own (version managers like nvm/rbenv/pyenv/conda, `eval "$(... init)"`
lines, compinit, plugin frameworks, hooks that run on every `cd` or prompt).
Show me a table of what costs what before changing anything.
2. Suggest fixes ranked by time saved, e.g. swapping slow tools for fast drop-ins
(nvm → fnm, pyenv → uv), lazy-loading, caching completions, and removing dead or
duplicate lines. Point out anything risky, like secrets stored in plain text.
3. Before editing, back up the file next to the original with a timestamp in the name.
4. If you replace a version manager, check which versions my projects actually pin
(.nvmrc, .node-version, .ruby-version, etc.) and any global packages I installed,
and reinstall only those so nothing breaks.
5. Afterwards, measure again and check that everything still works: the right versions
load in each project, my prompt looks the same, and my aliases work.
Give me a before/after summary and the command to undo it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment