Readline Wrap

I came across a very interesting tool the other day called rlwrap. It wraps the readline library over just about any interactive text input program. The readline library provides basic editing and history. It's handy for those programs that don't provide their own line editing facilities.

It tries to be as transparent as possible, detecting yes/no prompts and passwords, so it should still be reasonable under those conditions.

If you can't think of anything to try it with, try it with cat. Instant line editor!

rlwrap cat > some-file.txt

Or with Festival.

rlwrap festival --tts

It will also turn incorrectly compiled shells on your system into something usable. On my system (Debian GNU/Linux), csh isn't usable without rlwrap.

rlwrap csh

Have a comment on this article? Start a discussion in my public inbox by sending an email to ~skeeto/public-inbox@lists.sr.ht [mailing list etiquette] , or see existing discussions.

This post has archived comments.

null program

Chris Wellons

wellons@nullprogram.com (PGP)
~skeeto/public-inbox@lists.sr.ht (view)