We were struggling with doing exactly this, and we ended up writing some Ruby modules and classes to abstract this process because we couldn't find any obvious way to chain or build commands together. So, now all our individual commands are in our Ruby module and our TextMate commands call one or more of those Ruby methods to build out a more complex command. I don't know that this is the only way to do it, but it's working great for us and allows us to develop commands outside of TextMate's bundle editor first and it also avoids the problem of TextMate being stubborn about reloading bundles sometime. We've also developed a folder of "templates" that is separate and allows some of our less technical team members to update the copy in those templates.<br />
<br />
Cheers,<br />
Jamie<br />
<br />
On Wed, May 20, 2009 at 7:10 PM, Matt Handler (matt.handler@gmail.com) wrote:<br />
>
<div class="gmail_quote">does anyone know if there's a way to invoke another textmate command from within a textmate command?<br />
<br />
for example, i have a formatted output command that writes info to a clean html window... i want to have a compile command that gathers information, compiles, and then passes that resulting messages to the to the formatted output–the goal being to avoid copying my formatted output to every command that needs to output to an html window.<br />
<br />
i assume i can invoke the formatted output command using osascript and passing the gathered information via 'defaults write com...', but this seems like a sloppy fix<br />
<br />
ideally i could just do something like: `echo "$gatheredInfoArray" | $TM_BUNDLE_DIRECTORY/MyBundle.tmBundle/formattedOutput.sh`<br />
<br />
any ideas??<br />
<br />
thanks a bunch,<br />
<font color="#888888">-matt<br />
<br />
</font></div>
<br />
<br />
<br />
> _______________________________________________ <br />
> textmate-dev mailing list <br />
> <a href="mailto:textmate-dev@lists.macromates.com">textmate-dev@lists.macromates.com</a> <br />
> <a target="_blank" href="http://lists.macromates.com/listinfo/textmate-dev">http://lists.macromates.com/listinfo/textmate-dev</a><br />
>   <br />
> <br />
>