title: Unix commandline history substitution ^foo^bar (for multiple replacements)
body: <p>Occasionally I use the bash command to replace string in previous command:</p>
  
  <pre><code>^foo^bar
  </code></pre>
  
  <p>Today I wanted to make the replacement in the following line for replacing all occurrences of <code>checkbox</code> with `radio:</p>
  
  <pre><code>$ git mv _product_checkbox_buttons.html.erb _product_checkbox_button.html.erb
  $ ^checkbox^radio
  git mv _product_radio_buttons.html.erb _product_checkbox_button.html.erb
  </code></pre>
  
  <p>So it only replaces the first occurrence. How do I make it replace all occurrences?</p>
  
  <pre><code>bash --version
  GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)
  Copyright (C) 2007 Free Software Foundation, Inc.
  </code></pre>