As a distractable developer, my worst enemy is the 2-5 minute long build, protobuf generation, test suite, etc. It’s just long enough that sitting and staring at the terminal is boring. So I end up tabbing over to Slack or the browser. I start down some other road of inquiry. Then 20 minutes later, I’m back in my terminal and I have no idea what I was last doing.

Here is my little trick that lets me navigate away from the terminal without totally losing my context.

On a Mac, I’ll add the following to my command:

; say "done"

This makes the OS say the word “done” when the command is complete. If you want something more universal, you can echo the “bell” character. I normally have the bell turned off, so this is less useful for me.

; echo -e '\a'

Give it a shot and see if it helps you as much as it’s helped me.