Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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

You must log in to answer this question.

Browse other questions tagged .