[TxMt] Template Code
Ketan Anjaria
fire at kidbombay.com
Thu Sep 28 21:17:29 UTC 2006
This is my template command
if test \! -e "$TM_NEW_FILE"; then
TM_YEAR=`date +%Y` \
TM_DATE=`date +%Y-%m-%d` \
TM_USERNAME=`niutil -readprop / /users/\$USER realname` \
TM_PACKAGE=`sed <<<"$TM_NEW_FILE_DIRECTORY" 's#.*classes/
##'|tr / .`
perl -pe 's/\$\{([^}]*)\}/$ENV{$1}/g' \
< class.as > "$TM_NEW_FILE"
fi
And TM_PACKAGE comes out blank.
what am I doing wrong?
On 26/9/2006, at 19:52, Ketan Anjaria wrote:
> In a previous version of textmate the following code for a template
> worked to create a TM_PACKAGE variable
>
> TM_PACKAGE=`sed <<<$TM_NEW_FILE_DIRECTORY -n 's#.*classes/\
> (.*\)#\1#p'|tr / .` \
Try this: TM_PACKAGE=`sed <<<"$TM_NEW_FILE_DIRECTORY" 's#.*classes/
##'|tr / .`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20060928/09fefbff/attachment.html>
More information about the textmate
mailing list