7 comments

[ 3.3 ms ] story [ 11.8 ms ] thread
As someone who likes to toy around with lots of REPLs, rlwrap has been an awesome too for my toolbelt.
I have been using it with Oracle SQLPlus to regain some sanity. I wish Oracle would develop a good CLI and make it available by default. For bonus points, release it to be relocatable and backward compatible with older versions.
The description mentioned socat as a replacement. Does anyone know how? "man socat" examples only show using readline for sending TCP messages.
Something along the lines of `socat readline exec:<cmd>` should work, e.g., `socat readline exec:cat`.

I tend to prefer using rlwrap, though; socat has a tendency to mess up your terminal if you SIGINT it. rlwrap does its job extremely well, except for the parenthesis matching flash (which I find annoying, but can be disabled with a config option).

A great reminder that what one deems obvious (i.e. existence and utility of `rlwrap` to me) may not be obvious at all to others.

And while I'm here: maybe you are unaware of `nohup`, which makes a lot of software that really expects a terminal for IO just sit in the background and do its job.

(Indeed I have both `nohup` and `rlwrap` in the same mental category of CLI wrapper-helpers.)

An invaluable tool for languages like Common Lisp, Tcl, and others with REPLs that are missing a basic command editing experience (clear line, search history, etc.).
rlwrap is especially useful when sshing into a high latency remote box. If you can use mosh, it's even better.