robbyrussell/oh-my-zsh — pull request #711 by jasongill (2011-11-16 21:04:08+00:00)
Title: Improvements to the tm command in the TextMate plugin

I've committed a simple improvement for the "tm" command created by the TextMate plugin. Right now, the tm command must be passed a directory, and it attempts to cd into the directory and open it in TextMate. However, the order of operations is wrong, so it doesn't actually work (at least not very well).

I've improved the tm command to:

* Open the current directory in TextMate when it's passed no arguments; so typing tm by itself will just open up TextMate with all of the files in the current directory in the project drawer
* Open a single file when passed a filename; so typing "tm ~/.zshrc" will open your .zshrc in TextMate
* Open a directory in TextMate and cd in to it when passed a directory - the original intention of the command

Hope this helps everyone else as much as it's helped my workflow!