title: Suppress syntax error or warning in bash_completion every time new terminal is opened?
body: <p>I enabled <code>bash_completion</code> in my <code>.bashrc</code> file. Now every time I start a terminal, it shows me this warning:</p>
  
  <pre><code>bash: [: too many arguments
  bash: [: =: unary operator expected
  bash: [: =: unary operator expected
  bash: [: too many arguments
  </code></pre>
  
  <p>For more info, i ran this command:</p>
  
  <pre><code>$ bash .bashrc
  </code></pre>
  
  <p>And it show me this warning:</p>
  
  <pre><code>/etc/bash_completion.d/gcc: line 50: [: too many arguments
  /etc/bash_completion.d/ifupdown: line 3: [: =: unary operator expected
  /etc/bash_completion.d/ifupdown: line 19: [: =: unary operator expected
  /etc/bash_completion.d/man: line 3: [: too many arguments
  </code></pre>
  
  <p>Line 50 of <code>/etc/bash_completion.d/gcc</code>:</p>
  
  <pre><code>[ $USERLAND = GNU -o $UNAME = Cygwin ] &amp;&amp; \
  </code></pre>
  
  <p>I don't see what the problem is here? How do I suppress those warnings from coming up a the start of terminal.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I ran <code>bash -xv .bashrc</code> as suggested by Adrian and i found these in the output:</p>
  
  <pre><code>+++ '[' = GNU -o Linux = Cygwin ']'
  /etc/bash_completion.d/gcc: line 50: [: too many arguments
  .
  .
  .
  +++ '[' = GNU ']'
  /etc/bash_completion.d/ifupdown: line 3: [: =: unary operator expected
  +++ '[' = GNU ']'
  /etc/bash_completion.d/ifupdown: line 19: [: =: unary operator expected
  </code></pre>
  
  <p><strong>EDIT: 2</strong></p>
  
  <p>Output of <code>bash -x /etc/bash_completion | grep -E 'UNAME|USERLAND'</code></p>
  
  <pre><code>++ UNAME=Linux
  ++ UNAME=Linux
  ++ unset UNAME RELEASE default dirnames filenames have nospace bashdefault plusdirs
  </code></pre>