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?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
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
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.
nslookup. I just revised the question.