title: How can I provide tab completions to fish shell from my own script?
body: <p>I am running Ubuntu 13.10 and fish 2.1.0. I want to write myself a Python script to do some tasks from the command line. The script will require command line arguments.</p>
  
  <p>How can I write my script such that fish can request and get possible values for a given argument. The list of potential values is dynamic. That is, it will be determined programatically (e.g. a list of folder names matching some criteria).</p>
  
  <p>The end result I am aiming for is something like:</p>
  
  <pre><code>user@machine ~&gt; myprog argument=fol&lt;TAB&gt;
  folder1  folder2  folder3
  </code></pre>
  
  <p>Where <code>myprog</code> is my script file, <code>argument</code> is the argument name and <code>folder1</code> etc are valid values generated by some function in my script.</p>
  
  <p>Is this possible, and if so how?</p>