jashkenas/coffee-script — pull request #2886 by danielgtaylor (2013-03-25 05:51:26+00:00)
Title: Add history to the coffee interactive interpreter that persists between ...

...sessions using a ~/.coffee_history file in a similar way to bash. Code based on repl.history and Node pull request 3178 with modifications.

https://github.com/tmpvar/repl.history
https://github.com/joyent/node/pull/3178/files

Modifications:
- Use ~/.coffee_history filename by default
- Only read up to 10240 bytes of history instead of everything
- Set default history index to -1 (i.e. pressing up will then show the last saved command first)

Tested locally on Mac with Node 0.10 and CoffeeScript 1.6.2 and it is working very nicely for me. There may be path issues between different operating systems, however.