Did you ever use a tool such as netcat, which has no history and does not allow you to edit the line you are typing?
% nc localhost smtp 220 cocorico.example.com ESMTP Postfix HELO localhost 250 cocorico.example.com MAIL FROM: <tanguy@localhost> 250 2.1.0 Ok RCTP TO: <tanguy@localhost> 502 5.5.2 Error: command not recognized ^[[A Sh*t, line recall does not work! 502 5.5.2 Error: command not recognized
Here comes rlwrap: it is a small and useful tool that wraps any command line-oriented tool using readline to provide you a history allow you to edit each line before you send it:
% rlwrap nc localhost smtp 220 cocorico.example.com ESMTP Postfix HELO localhost 250 cocorico.example.com MAIL FROM: <tanguy@localhost> 250 2.1.0 Ok RCTP TO: <tanguy@localhost> 502 5.5.2 Error: command not recognized ↑ RCTP TO: <tanguy@localhost> ⇱…
rlwrap's effect is hard to describe with a transcript, so here are two screencasts, with and without it. If you often use tools such as netcat, try it!
3 comments
saturday 05 january 2013 à 21:23 tomás zerolo said : #1
monday 07 january 2013 à 05:25 Axel Beckert said : #2
thursday 06 march 2014 à 14:04 Jim said : #3