title: How to enable bash auto-completion for a function?
body: <p>I have read this tutorial on bash auto-completion <a href="http://www.debian-administration.org/article/316/An_introduction_to_bash_completion_part_1" rel="noreferrer">An introduction to bash completion</a> and I am trying to get the same auto-completion that is already done for <code>ssh</code> for one of my functions (that is loaded from <code>.profile</code>); which acts pretty much as an <em>alias</em>.</p>
  
  <p>What I am trying to do is : get the same auto-completion, that is provided by default for <code>ssh</code> (which is the function <code>_known_hosts</code>; do <code>complete -p | grep ssh</code> and you will get <code>complete -F _known_hosts /etc/init.d/ssh</code>), and get it for my own function (which is installed like you woul install an alias, and that in fact does a <code>scp</code> and then an <code>ssh</code> with the original argument)</p>