[Erlang 0044] Erlang shell history

Source: Internet
Author: User
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!


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.