Update 'tm' function to take multiple files on the command-line
Diff
1diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh
2index 02813de9e6bbc5dfd45c481d448a6e8ad6480ec4..17451101931de3a7d9d3556cbfb4471d303c4674 100644
3--- a/plugins/textmate/textmate.plugin.zsh
4+++ b/plugins/textmate/textmate.plugin.zsh
5@@ -1,13 +1,14 @@
6 # If the tm command is called without an argument, open TextMate in the current directory
7 # If tm is passed a directory, cd to it and open it in TextMate
8-# If tm is passed a file, open it in TextMate
9+# If tm is passed anything else (i.e., a list of files and/or options), pass them all along
10+# This allows easy opening of multiple files.
11 function tm() {
12 if [[ -z $1 ]]; then
13 mate .
14- else
15+ elif [[ -d $1 ]]; then
16 mate $1
17- if [[ -d $1 ]]; then
18- cd $1
19- fi
20+ cd $1
21+ else
22+ mate "$@"
23 fi
24 }