title: How do you get a bash function to autocomplete as if it were something else?
body: <p>Normal autocompletion for <code>git checkout</code> is to perhaps display a list of branches that you can then autocomplete for. What can I do to add the same autocompletion behavior for my function that wraps <code>git checkout</code>? </p>
  
  <p>Hypothetically: </p>
  
  <pre><code>function git_checkout () {
    git checkout $1
    do_some_custom_other_stuff
  }
  </code></pre>
  
  <p>How do I make it so that the <code>git_checkout</code> function autocompletes the same as <code>git checkout</code>?</p>