title: Add spaces to the end of some Bash autocomplete options, but not to others?
body: <p>I'm trying to create a Bash completion script for a Java program.  A typical invocation of that program might look like this:</p>
  
  <pre><code>$ javaProgram -Dproperty=foo option1 option2
  </code></pre>
  
  <p>Part of my script will be to suggest the various Java properties that are available for this program (i.e., when the user types <code>-D</code>, the script would suggest, say, <code>property=</code>, allowing the user to then type the value).</p>
  
  <p>I'd like the completion to not insert a space after the equals sign.  However, when the user is typing the various options for the program (<code>option1</code> and <code>option2</code> in the above example), I'd like the script to do the completion, and insert a space when it is completed.</p>
  
  <p>I'm new to Bash completion scripting, but I'm aware of the <code>nospace</code> option for the <code>complete</code> shell builtin.  It doesn't seem to work for the <code>compgen</code> builtin, though, which seems like what I want.  I've tried using <code>nospace</code>, and then explicitly including spaces at the end of the appropriate options, but they don't seem to be making it through.</p>
  
  <p>Does anyone know how to get spaces at the end of some options, but no spaces at the end of others?</p>