Mere Code

Diverse Topics of General Interest to the Practicing Programmer

Undistract me (redux)

In January, I told you all about a terminal hack to help me recover from the inevitable distraction that comes when I run commands that take a while to run (for me, mostly test suites).

I’ve been using the hack since then, and it has given me a great deal of pleasure. Others have watched it and said that they very much wanted it.

As such, you can now go to the undistract-me website to get instruction on how to download and install it. Or, if you’re using Ubuntu:
$ sudo add-apt-repository ppa:undistract-me-packagers/daily
$ sudo apt-get update
$ sudo apt-get install undistract-me
Once you’ve done that, and have started a new login shell, then you’ll get a notification whenever a command that takes more than 10 seconds to run finally completes.

Thanks to Glyph Lefkowitz for the preexec hack that made this possible, and to Chris Jones, Clint Byrum and Michael Vogt for their help in figuring out what I should do.


Jonathan Lange on 2012-10-04 16:06
Thanks for the bug! I've replied in detail there.
Andrew on 2012-10-04 14:41
undistract-me doesn't work for me in Ubuntu 12.10. I've filed a bug: