[TxMt] parsing errors from textmate to terminal

Martin Batholdy batholdy at googlemail.com
Fri Feb 2 13:55:39 UTC 2018

Dear all,

When parsing large amount of text from textmate2 to the terminal, it sometimes happens that strange parsing errors occur.
Line breaks, white space, or symbols are arbitrarily not send correctly to terminal.

For example; this line in textmate:
col <- ifelse(…

ended up like this in terminal:
col <col <cse(...

Hence, whenever I want to run multiple lines of code, I end up with errors, which makes it very difficult to work with textmate in combination with terminal.

I use the following command to parse the selected text to the terminal:

[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"

rawText="$(cat | sed 's/ / /g;')" 


osascript  -e 'on run(theCode)' \
	   -e 'tell application "Terminal" to activate' \
           -e 'tell application "Terminal"' \
           -e 'do script theCode in window 1' \
           -e 'end tell' \
           -e 'end run' -- "$rawText”

Thanks for any help and advice!

More information about the textmate mailing list