ingvar: NetBSD's libedit/editline library provides similar functionality to GNU readline, and it includes a readline compatibility header so it's at least partitially API compatible.
There's a couple of multi-platform ports, one by Jess Thrysoee which seems to be actively maintained, and a sourceforge project which doesn't seem to have been touched for a while. There's also a couple of platforms (Debian, Mandrake) that have versions that seem to be based directly on NetBSD's CVS tree.
(The reason I know this, BTW, is that in the current development versions, OpenSSH's sftp now uses libedit for command-line editting. It's always enabled in OpenBSD -current, and it's optionally enabled in Portable by ./configure --with-libedit. djm did the coding, I just did the configure bits.)