Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

After I upgraded to OS X I am not able to use my ~/.inputrc bindings to search through the shell command history:

# these allow you to start typing a command and
# use the up/down arrow to auto complete from
# commands in your history
"\e[B": history-search-forward
"\e[A": history-search-backward

Any idea what I have to change or do? Are there any default keys for that I could use?

share|improve this question
1  
I don't know what could be wrong, but for comparison my .inputrc has the same bindings as yours and they work (Mac OS X Lion 10.7.1). In fact, if I remove my .inputrc altogether, the arrow keys still work, since by default they map to similar history commands, as shown by bind -P. What happens to the up/down arrow keys if you remove (or rename) your .inputrc file? –  Chris Page Sep 26 '11 at 11:52
add comment

1 Answer

up vote 3 down vote accepted

The up/down history scrolling in Terminal only works in bash, not sh. Try typing bash in Terminal, and see whether the arrow keys work. If this is the case, you can go to preferences and set your default login shell to /bin/bash.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.