I recently added some commands to rIDL to view and manipulate the command history. This makes it easier to copy commands entered at the command line to a file. See the screencast below for a demo.

Bridge command line to files