It’s time for me to praise one of the useful utilities that makes my everyday work just a little bit more pleasant: rlwrap.
rlwrap “wraps” other interactive programs, providing readline functionality for programs that don’t have it built in. For example, last week I had to repeatedly use ‘imtest’ and ‘cyradm’ while doing some exploration about IMAP. Neither of these tools supports readline, so I normally would be able to press ‘up’ to recall my last command, use ^W or ^U to clear parts of my command, or use ^R to search my history. This would be very frustrating.
So, here comes rlwrap. You use it just like sudo, prefixing it to the command you want to run, thus
imtest -u sweeks -a vmadmin -t '' -m plain localhost
rlwrap imtest -u sweeks -a vmadmin -t '' -m plain localhost
rlwrap even remembers command history on a per-command basis, so you can recall your interactive commands from previous sessions. This greatly eases debugging. rlwrap is a very valuable part of my toolkit. If this interests you, you can also enable filename tab-completion, or even custom wordlists for tab-completion of command-specific commands.
I mentioned this to my co-workers, and I was surprised to hear that none of them had ever heard of it before. What tools do you use that you take for granted that everybody knows about?