Maybe you have a big ol' monorepo, and git
operations are pretty slow in it. For those of us who like to show information about the repository's dirty status in our prompt, that means a slow prompt. Waiting 1s every time you hit the return
key can really add up! Instead of just giving up and eschewing the dirty status entirely, why not just cache it in the background have your prompt read from the cache?
First, install fswatch
:
brew install fswatch