textmate.plugin.zsh 306 B

12345678910111213
  1. # If the tm command is called without an argument, open TextMate in the current directory
  2. # If tm is passed a directory, cd to it and open it in TextMate
  3. # If tm is passed a file, open it in TextMate
  4. function tm() {
  5. if [[ -z $1 ]]; then
  6. mate .
  7. else
  8. mate $1
  9. if [[ -d $1 ]]; then
  10. cd $1
  11. fi
  12. fi
  13. }