textmate.plugin.zsh 723 B

123456789101112131415161718192021
  1. alias et='mate .'
  2. alias ett='mate Gemfile app config features lib db public spec test Rakefile Capfile Todo'
  3. alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo'
  4. alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo'
  5. # Edit Ruby app in TextMate
  6. alias mr='mate CHANGELOG app config db lib public script spec test'
  7. # If the tm command is called without an argument, open TextMate in the current directory
  8. # If tm is passed a directory, cd to it and open it in TextMate
  9. # If tm is passed a file, open it in TextMate
  10. function tm() {
  11. if [[ -z $1 ]]; then
  12. mate .
  13. else
  14. mate $1
  15. if [[ -d $1 ]]; then
  16. cd $1
  17. fi
  18. fi
  19. }