Before I was able to use the Up/Down arrow keys to cycle through previous commands, but now when I press a directional key it outputs "^[[A". I'm running a bash shell. How do I fix this?
How to fix unix so that I can use the arrow keys in a terminal
keyboardterminal
Best Answer
The likely problem is that bash (not a full-screen program) is using termcap (for full-screen programs) and not accommodating the use of application mode in the key bindings.
The problem can be solved by one of these approaches:
.inputrc
(the route taken by most bash users)linux
andrxvt
) does not use application mode, orzsh
), it knows how to accept keys automatically whether they use normal or application mode.Further reading:
xterm-noapp
terminal description.