What I Learned Today

The most annoying thing about using OS X for development for me is really simple: when I open a new tab in Terminal, I want it to open in the same directory the previous terminal is in. gnome-terminal does this, and it's a life-saver. I found this script today at a cat's GitHub homedir repo to help out with that:

# ~/bin/nt
# A simple script to open a new tab in Terminal in the current directory with an
# optional command
#
# Stolen from: http://github.com/bradleywright/homedir/ and modified
 
if [ $TERM_PROGRAM = "Apple_Terminal" ]; then
  osascript -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' > /dev/null
  osascript -e "tell application \"Terminal\" to do script \"cd $PWD\" in window 1" > /dev/null
  if [ -z "$1" ]; then
    exit 0
  fi
  osascript -e "tell application \"Terminal\" to do script \"$*\" in window 1" > /dev/null
fi

Radiant news: This Aissac guy is putting us all to shame: he's made a custom fields extension.

I learned so much about irb that I made a post about it on Viget Extend that'll show up on Monday.

Published: 27 Mar 2009