title: How do I bind C-? in bash?
body: <p>I want to bind <code>C-?</code> to history-search-backward in bash and/or zsh. I tried the following way</p>
  
  <pre><code>bind '"^?": history-search-backward' # bash
  bindkey '^?' history-search-backward # zsh
  </code></pre>
  
  <p>The binding works fine, but at the same time <code>BS</code> (backspace) stops working correctly. The reason is that <code>BS</code> generates the same code as <code>C-?</code> what one can check with <code>C-v BS</code> and <code>C-v C-?</code>. Thus the final result is that both <code>C-?</code> and <code>BS</code> are bound to history-search-backward what is obviously not what I wanted. </p>
  
  <p>So the question is how can I <strong>properly</strong> bind <code>C-?</code> without affecting <code>BS</code>?</p>