September 8th, 2008 ·
Update (2008/09/10): Giles Orr kindly pointed out that he is not the author of the bash prompt package I use, I have updated to give proper credit to the author, Raymond Page.
For some time I have used Raymond Page’s bash prompt code (heavily based on the work by Giles Orr in the Bash Prompt HOWTO, you can get it at http://gentoo-wiki.com/TIP_Prompt_Magic or http://code.google.com/p/homenix/source/browse/, you need to get .prompt, .prompt_functions and .prompt_config from the trunk/ directory), which I like very much because it is highly customizable, and although a lot of the functions are Linux-specific, it can easily be made to work on Mac OS X. It features context-dependent prompt colorization (e.g. based on whether the current directory is writable and on the machine load), automatic shortening of the prompt based on window width, and many other features.
More recently, I came across this hint for producing Growl notifications for shell commands that run for more than a predefined length of time, which I find extremely useful for knowing when those commands have finished.
Because both rely on some of the same mechanisms in bash, merging them is not completely straightforward. Here’s what I did:
- Download and install .preexec.bash as instructed in the hint.
- Add the preexec() function and preexec_install call to your .bashrc or .bash_login file (as instructed)
- Add the code from the precmd() function in the hint to the preexisting precmd() function in the .prompt file. I added it at the end. This is the main difference from what is described in the hint. I added it at the very end of the function.
That’s it - a nice bash prompt with growl notifications for long-running commands.
Posted by email from zzamboni’s posterous
Tags: bash · growl · howto · macosx · prompt · Tips & tricks
September 8th, 2008 ·
If you have been using my method for defining new wallet items in 1Password, you may have noticed that in recent versions the display of those new items has been broken. I have updated the instructions and the script to work with the recent changes, you can get it from the same page.
Posted by email from zzamboni’s posterous
September 2nd, 2008 ·
I had noticed for a while that somehow my Mail.app’s “recent mail addresses” list was not updating (I never seemed to get any of my recently used addresses in Quicksilver). Today I noticed the following error message in /var/log/system.log:
Mail[365]: AddressBook failed to save: Error Domain=NSCocoaErrorDomain Code=259 UserInfo=0×10c9a810 “The file MailRecents-v4.abcdmr could not be opened because it is not in the right format.” ({\n NSFilePath = “/Users/dza/Library/Application Support/AddressBook/MailRecents-v4.abcdmr”;\n NSUnderlyingException = Fatal error. The database at /Users/dza/Library/Application Support/AddressBook/MailRecents-v4.abcdmr is corrupted. SQLite error code:1;\n})
While trying to figure out what was wrong, I discovered that the file for some reason had an ACL that prevented everyone (including me!) from modifying it:
~/Library/Application Support/AddressBook $ /bin/ls -lea MailRecents-v4.abcdmr
-rw——-@ 1 dza staff 102400 Feb 4 2008 MailRecents-v4.abcdmr
0: group:everyone deny write,delete,append,writeattr,writeextattr,chown
So I removed the ACL:
$ /bin/chmod -a# 0 MailRecents-v4.abcdmr
And the error is gone! The file was not corrupted, but Mail could simply not write to it. The puzzling part is how did that ACL end up there…
Posted by email from zzamboni’s posterous
Tags: howto · macosx · mail.app
September 1st, 2008 ·
Here’s my mapping from David Allen’s GTD workflow to the parts in my system that implement each component. My main electronic tools are Things (http://culturedcode.com/things/), Journler (http://journler.com/), Mail.app and iCal. My main physical tools are my HPDA, my physical tickler file, my A-Z filing cabinets and my “inbox” and “pending” boxes.
(the workflow image is © David Allen & Co.)

Posted by email from zzamboni’s posterous
Tags: GTD · Productivity
August 28th, 2008 ·
Posterous looks quite nice, with the ability to “do the right thing” for different media types, and to autopost to other places. I have just set it up to autopost to my blog (http://zzamboni.org/brt/), we’ll see if it does the right thing.
It should also auto-post to Flickr, so here goes a test photo.

Posted by email from zzamboni’s posterous
August 19th, 2008 ·
I have just configured things so that my RSS feed is served through FeedBurner. I am using a Wordpress plugin so that the redirection should be transparent (here’s the FB url: http://feeds.feedburner.com/BrT), but if you notice anything broken, please let me know.
Of course, I haven’t posted anything in so long that I wonder if anyone will even notice. That’s what having a second baby will do to you
Tags: Site news