Make zsh start INSTANTLY with this one weird trick.
1. Download instant-zsh.zsh.
curl -fsSL -o ~/instant-zsh.zsh https://gist.github.com/romkatv/8b318a610dc302bdbe1487bb1847ad99/raw
2. Add this at the top of your ~/.zshrc.
source ~/instant-zsh.zsh
instant-zsh-pre "%n@%m %~%# "
Adjust the argument of instant-zsh-pre to be similar to your real prompt. For example, if you are using Powerlevel10k with lean two-line prompt, this works well:
instant-zsh-pre "%B%39F${${(V)${(%):-%~}//\%/%%}//\//%b%31F/%B%39F}%f"$'\n'"%76F❯%f "
3. Add this at the bottom of your ~/.zshrc.
instant-zsh-post