[TxMt] Relative paths in shell variable

Allan Odgaard allan at macromates.com
Thu Jun 23 08:37:07 UTC 2005


On 23/06/2005, at 10.33, Chris Jenkins wrote:

> [...] be able to get the path of the current file relative to the  
> project directory

Try this: ${TM_FILEPATH#$TM_PROJECT_DIRECTORY/}

The #-thing means: “minus this prefix”. There's also % for “minus  
this suffix”.




More information about the textmate mailing list