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.

link|improve this question
1  
What's in your ~/.inputrc? – glenn jackman Sep 9 '11 at 17:22
1  
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
feedback

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

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

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.