[TxMt] opening Projects from command line
William Scott
wgscott at chemistry.ucsc.edu
Sat Oct 7 06:39:55 UTC 2006
I'm a new (but paid up) textmate luser, and I am beginning to appreciate
the advantages of saving projects, but find that I tend to have them
scattered all over my user directory. I also have a bad memory, so
sometimes not only do I forget where they are, I forget what I have named
them. I wanted an easy command-line way to find and open textmate
projects regardless of where they are located. I wrote a shell script
that uses mdfind to locate them, permit listing of them, and open
them. This works as a shell script or a zsh function.
http://tinyurl.com/j6gbb/tmpj
tmpj foo
opens the project named foo (actually it will open all projects named foo,
so tweak the script if this is problematic) in any location.
If used as a zsh function, I wrote an accompanying completer:
http://tinyurl.com/j6gbb/_tmpj
Then all you do is type tmpj and hit the tab key and you can permute
through a list of every textmate project on your hard drive that has been
indexed by SpotLight. If you don't want to use zsh, then you can isue the
command
tmpj -l
and it will do the same and list possible projects. Then you just pick a
project from the list and issue
tmpj foo
as before.
HTH someone.
More information about the textmate
mailing list