How can I make the up arrow work in Terminal's nslookup command? When I open terminal, I'd like the up arrow go to the last command I typed within nslookup. Instead, I get a strange escape sequence.

What must be done to allow me to up arrow in nslookup?
Nslookup on OS X does not seem to use readline, so it does not support the arrow keys.

You can install rlwrap, which is available in MacPorts and presumably other package managers.  Then you can run 

rlwrap nslookup


To get arrow key support.

Many thanks to this thread on the MacRumors forums.