Hi,

I made a command for the ruby texmate bundle that might be interesting.

What it does (on command-option-R):
- It takes the selected text or the current line (= STDIN)
- It finds a running IRB session in the Terminal.app. If you don't have one, it starts a new one.
- It pastes your code in IRB and switches to the terminal.app.

It saves you from manually selecting, copying, switching and pasting to try out some code in irb. A poor man's SLIME if you will.

The command is a basic ruby script that uses the scripting bridge to drive Terminal.app. It can also be adopted to use other interactive consoles (python, clojure, ..) by changing the REPL_ constants at the top of the script.
- REPL_CMD is the command to start the interactive console
- REPL_PROCESS is the active process that ends up running in the terminal.
- REPL_PROMPT is the prompt you get when you start the interactive console

See attachment for the command.

Greetings,

Jan Sabbe