[I'm reposting for a third time, since I wasn't subscribed at first, then I reposted as a subscriber, then deleted my *accepted* post. N00b. :confused:]
I created a bundle command to open a file from a repository directory, based on the selected text. It was put in the Text bundle, with no particular context.
Here's my current (working) command.
open "file:///path/to/repository/volume/$TM_SELECTED_TEXT.pdf"
This will open the PDF file with the selected filename. (I use open since I want to see the PDF in Acrobat, not TextMate.)
However, now there's arbitrary (unknown) text attached to the filename, so I want to use a wildcard in this command.
I got a suggestion to use an unquoted * as a wildcard. But if AAAA is selected, this command:
open "file:///path/to/repository/$TM_SELECTED_TEXT"*
will open a file in Textmate named AAAA*, which is not what I want: I want AAAA.pdf and AAAA-morestuff.pdf to open.
Any help is appreciated.
Thanks
Darryl
[I originally had this question attached as a comment to a TextMate blog entry, where Allen Odegaard posted the * wildcard suggestion, but it didn't work in this context.]
On Thu, Nov 15, 2007 at 09:39:32AM -0800, dzurn wrote:
[snip]
However, now there's arbitrary (unknown) text attached to the filename, so I want to use a wildcard in this command.
[snip]
Any help is appreciated.
Thanks
Darryl
Hi,
sorry for the late reply, I just found your mail.
Have to tried a command with the following content?
open /path/to/repository/$TM_SELECTED_TEXT*
Without files:/// and without quotes? This works fine for me.
Hope this helps, Simon