title: How to get the program name in a fish shell script?
body: <p>In bash, as in ruby, the program name is given by $0.  What is it in fish?  I can do the following if I have to:</p>
  
  <pre><code>set PROGRAM (ps --no-header -o args -p %self | egrep -o '\S+')[2]
  </code></pre>
  
  <p>But I'm sure the program name must be already available somewhere.  I could also set the program name in variable at the stub of each program, but that has maintenance problems.</p>