title: 'have' keyword for bash completion
body: <p>Is <code>have</code> a keyword in bash? Or do bash completion scripts use a language that is not bash?</p>
  
  <pre><code>have gcc &amp;&amp;
  _gcc()
  {
  </code></pre>
  
  <p>It is common. See: <code>grep "have .* &amp;&amp;" /etc/bash_completion.d/*</code></p>
  
  <p>I could not find any information on the bash completion tutorials I've seen and I could not find any information in <code>man bash</code>. It's also difficult to google "have". Where do I find documentation on this?</p>
  
  <p>I'm guessing it has to do with making sure that there <code>gcc</code> exists in the <code>PATH</code>?</p>
  
  <p>edit: yes. <code>/etc/bash_completion</code> contains:</p>
  
  <pre><code>have()
  {
      unset -v have
      # Completions for system administrator commands are installed as well in
      # case completion is attempted via `sudo command ...'.
      PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &amp;&gt;/dev/null &amp;&amp;
      have="yes"
  }
  </code></pre>