I often ssh to a remote machine and work in an interactive shell (e.g. pry). If the ssh connection is slow, typing complex commands is very tedious because of the delay in echoing back the keystrokes.
Is there a tool I can use to type text locally and then submit the result when I'm ready? (Yes, cut-and-paste would work, but I'm wondering if there's a more elegant solution.)
For background, I'm using Terminal.app on a Mac (OS X 10.7) but not wedded to it.