A small quality of life tip for when you are tinkering with your dotfiles (shell, in particular):

$ bash --norc --noprofile # bash is everywhere, and disable user configs in case they are in a busted state. Feel free not to do. bash-5.2$ while zsh; do true; done my-fancy-zsh> cd ~git/dotfiles # Try the current config, see if it works. my-fancy-zsh (errror, your git prompt is busted!)> # Oh no! Let's fiddle with .zshrc some more. my-fancy-zsh (errror, your git prompt is busted!)> ^D # Ctrl-D to exit the shell. my-fancy-zsh> # Restarted in a clean state! my-fancy-zsh> cd ~git/dotfiles # Try again. my-fancy-zsh (omg, something is not checked in 🙈)> # That's much better! my-fancy-zsh (omg, something is not checked in 🙈)> exit 1 # We are done here. bash-5.2$ ^D

This works much better than source ~/.zshrc because not everything in the rc file is idempotent and broken state from a bad attempt can mess with things. It spares me a lot of frustration of opening and closing terminal tabs, which is what computers are supposed to do for us.