One of the most depressing problems in code debugging is that once Erlang shell closes the command history that has just been entered, it will be lost. It is convenient to maintain the history of an input command; the following project can help us solve this problem:
Projects/rlwrap
Rlwrap
Rlwrap is a Readline wrapper, a small utility that uses the GNU Readline library to allow the editing of keyboard input for any other command. it maintains a separate input history for each command, and can TAB-expand words using all previusly seen words and/or a user-specified file.
My system is centos 5.6. The installation method is as follows:
wget 'http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz'
tar zxf rlwrap-0.37.tar.gz
cd rlwrap-0.37
./configure
make install
Note: You may be prompted that the Readline library is missing. Run the following command to install it:
yum install readline-devel
Set aliases for ease of use
VI ~ /. Profile add alias ERL = '/data/rlwrap/rlwrap-0.37/src/rlwrap-A erl' save and exit
Reload aliases
Source ~ /. Run ERL in profile several times to close it, and then run ERL. Try the up and down arrows to see if all the commands just entered are still there ?! There are also a lot of good Linux tools waiting for me to explore, go!