Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Trouble with history when using bash vi bindings on iTerm2 on Lion. (I had the same problem with iTerm when I switched to Lion.)

Hard to explain exactly, but when I hit k to go to most recent command, it pushes the cursor forward a few characters, so it's no longer at start of line. And if I then hit k again, it doesn't clear the characters before the cursor.

share|improve this question

migrated from stackoverflow.com Sep 10 '11 at 16:26

This question came from our site for professional and enthusiast programmers.

What's in your ~/.inputrc? –  glenn jackman Sep 9 '11 at 17:22
I'm unfamiliar with iTerm, but this sounds like a termcap problem, where bash (or really, readline/ncurses underneath it) thinks that the terminal needs different characters for cursor movement than it really does. Fix is to make sure TERM is correct and/or that your termcap/terminfo definitions are up to date. –  evil otto Sep 9 '11 at 17:32
@evil Actually that fixed it. I have "xterm" set by default, tried several TERM settings, but then I "unset TERM" and that worked! –  mahemoff Sep 9 '11 at 17:36

Your Answer


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

Browse other questions tagged or ask your own question.