[TxMt] Path to current bundle?

Allan Odgaard throw-away-1 at macromates.com
Fri Oct 7 09:35:47 UTC 2005


On 07/10/2005, at 11.07, Chris Jenkins wrote:

> Does anyone know if its possible to get the full path to the  
> current bundle within a command?

It is: "$TM_BUNDLE_PATH"

But it's better to use "$TM_BUNDLE_SUPPORT". The latter will point to  
the Support directory inside the bundle, but having the advantage  
that if you have the same bundle in multiple locations, it will use  
the most local support directory (that exists).

Cause e.g. installing a bundle in /Library and editing a command in  
that bundle will copy (only) the command to ~/Library, and thus have  
"$TM_BUNDLE_PATH" now point to ~/Library, even though the  
dependencies are likely to remain in /Library. But  
"$TM_BUNDLE_SUPPORT" will still point to /Library (if there was a  
Support directory in the bundle, and that hasn't (manually) been  
created for the bundle in ~/Library).





More information about the textmate mailing list