Rlwrap: allow telnet to support command history

Source: Internet
Author: User

Recently, the cocos2d-x engine added a telnet remote debugger, the usage is very simple, first start test Cpp Demo, then open the terminal, enter:

Telnet local host 5678

Connect to the testcpp built-in debugging server.

Currently, there are not many supported commands, and they are being added...

However, the telnet terminal does not support command history. If you press the upper and lower keys on the keyboard in telnet, garbled characters such as ^ [A ^ [[B, which is too inconvenient.

I plan to add a buffer on the server to support command history. But how can I remove garbled characters from the client? It seems that only echo is disabled. On mac, telnet ECHO is enabled by default...

Google: How can I enable telnet Echo? I didn't find it... But it surprised me to find a good thing: rlwrap

This is a special tool used to support telnet History commands. The usage is as follows:

Rlwrap telnet local host 5678

After the connection is successful, enter several commands and press the upper and lower keys on the keyboard. No garbled characters are displayed on the terminal, but historical commands ~~ Shuang

Rlwrap can be installed through macports

Sudo port install rlwrap

If you have not installed macports, you can download the macports installation package from the official website.

Http://www.macports.org/

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.