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.
To get arrow key support.
Many thanks to this thread on the MacRumors forums.
If you are using bash someones changed your key bindings. Look at ~/.bash_profile and see what's in there. Alternatively go to the Preferences for Terminal and select the profile you are using and then click on the Keyboard Tab. See if the cursor up is set to anything weird there.
As someone else mentioned the default setting in Terminal and bash is to display the last command.