Harry R. Schwartz

Software engineer, nominal scientist, gentleman of the Internet.

bearded cartoon drawing of the author hacker news gitlab sourcehut pinboard librarything 1B41 8F2C 23DE DD9C 807E A74F 841B 3DAE 25AE 721B

Vancouver

British Columbia

Canada

vegan

he

him

his


Just a Reminder That rlwrap Exists

Harry R. Schwartz

Published .
Tags: computer-science, unix.

rlwrap is a terrific little Unix tool to add GNU readline functionality to commands that don’t support it:

rlwrap is a wrapper that uses the GNU readline library to allow the editing of keyboard input for any other command. Input history is kept between invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line.

So if you’ve ever run a REPL and hit the up arrow, expecting the previous command to appear for editing, and instead generated a string of gibberish, you might find rlwrap helpful. Just prefix the REPL command with rlwrap and you’re off to the races:

$ rlwrap some_shoddy_repl
>

I’ve noticed that this is often useful with SQL clients, which invariably seem to screw up readline bindings.


You might like these textually similar articles: