[TxMt] A few problems with inserting text via a Command ???

Mats Persson mats at imediatec.co.uk
Fri Feb 11 12:13:44 UTC 2005

On 11 Feb 2005, at 12:06, Mats Persson wrote:
> On 11 Feb 2005, at 11:57, Rich Barton wrote:
>> On 11 Feb 2005, at 12:47, Mats Persson wrote:
>>> 2.	There is always a New line character behind the input, whereas I 
>>> would just want the cursor to remain immediately behind the inserted 
>>> text on the same line.
>> You can use the -n switch to remove the trailing newline, i.e.
>> echo -n `date +%Y-%m-%d`
> Thanks Rich, that helped me a lot. Now I can just 'arrow-left' and 
> continue typing. Thank you!

Ah, spoke to early there.  :(  The following command still produces a 
New line character behind it.

echo -n  $TM_FILEPATH | sed "s|^$TM_USER_ROOT_DIRECTORY\(.*\)\$|\1|"

Any idea of how to avoid that one ???

Kind regards,


"TextMate, coding with an incredible sense of joy and ease"
- www.macromates.com -

More information about the textmate mailing list