So I've been scratching my head about how to use all my custom config files when I'm using a machine without a dedicated user account (e.g., when pair programming). It recently dawned on me I could sidestep the issue by setting up a config directory in /tmp, pointing HOME to it, and launching GNU Screen. I hacked together a quick script I could run via curl -s http://c.tpope.net|sh that allows nearly instant setup on any system. It works beautifully on Linux but trying it on OS X has revealed several reminders why I haven't migrated.
The first issue I ran into was with GNU Screen. When invoking HOME=/tmp/tpope screen, HOME was mysteriously reverting back to that of the user with the shells run inside. After considerable head desking I finally made my way back to the OS X source where I found this gem of a patch which forces the invocation of /usr/bin/login in order to update utmp, causing the undesirable behavior as a side effect. Since they also disabled the -ln option (but didn't update the documentation), the only work around is to install another version of screen. So much for a quick setup.
Screen isn't the only breakage I've found. The love of my life Vim also ships with some rather unfortunate modifications on OS X. This first manifested itself when working on a client's machine, where git commit would fail because Vim was terminating with a non-zero exit status. Bizarrely, this wasn't happening on my personal MacBook even when I ran the same version of Vim included with Leopard. After a rather painful binary search (because there were multiple triggers) I determined that Vim's exit status was non-zero if any ex command failed, even if that failure was masked by :silent! or a :try block. Since this is a common technique in Vim script, OS X's unique behavior is thoroughly broken. (For those having this same problem, the version of rails.vim in Git should now no longer trigger this bug).
The problem turned out to be
yet another ill-conceived patch.
This patch is particularly nefarious because it links the behavior to
argv[0]. The behavior is triggered when vi or
vim is called but disabled when I explicitly test with
/usr/bin/vim, thus evading my attempts to reproduce the bug on my
MacBook.
So in short, my clever way of making a virgin OS X install quickly usable has been thwarted by two counts of stupidity on behalf of Apple. Swell.

