title: Setting case-insensitivity for bash completion on a command-by-command basis
body: <p>Is there a way to specify that a particular command has case insensitivity, without turning on case insensitivity globally (at least for that shell)?</p>
  
  <p>In my particular case, I have a small app that gives me command line access to a database of email addresses, so I type:</p>
  
  <pre><code>db get email john smith
  </code></pre>
  
  <p>and it returns back with John Smith's email address.  So I've managed to enable completion largely inside the app: setting</p>
  
  <pre><code>COMPREPLY=($(compgen -W "$(db --complete $COMP_CWORD "$COMP_WORDS[@]"}")" -- ${COMP_WORDS[COMP_CWORD]}))
  </code></pre>
  
  <p>works to allow me to tab-complete <code>get</code> and <code>email</code>.  However, if I then type <code>j&lt;tab&gt;</code>, it refuses, because in the email database, it's properly capitalised.  I'd like to get bash to complete this anyway.  (If I use a capital <code>J</code>, it works.)</p>
  
  <p>Failing that, I can have my <code>--complete</code> option change the case of its reply by matching the input, I suppose, but ideally the command line would match the database if at all possible.</p>
  
  <p>Note that I have this working inside the app when using readline, it's only interfacing with bash that seems to be an issue.</p>