title: How do I make bash reverse-search work in Terminal.app without it displaying garbled output?
body: <p>Using Terminal.app on OS X 10.5, often you see the commands get garbled when you do a reverse-search with Bash.  Is there some kind of termcap or perhaps a bash shopt command that can fix this?  It is very annoying.  </p>
  
  <p>Steps to reproduce:  Open Terminal.app, reverse-search to a longish command.  Hit &lt;ctrl&gt;-E once you've found the command.  The cursor goes to the end of the line, but the display doesn't update.  </p>
  
  <p>I'm guessing this is some kind of problem with the readline library on OS X.  It's more of a problem with updating the cursor position after a search than anything else.  Basically, ctrl-a and ctrl-e tend to break the search output. </p>
  
  <p><a href="http://involution.com/images/osxterminal.png">os x terminal failure image http://involution.com/images/osxterminal.png</a></p>
  
  <p>In the above, the first part of the command should be displayed, and the cursor should be at the end of the line, but it isn't.  You literally can't see what you're editing when this happens. </p>