title: zsh git autocomplete: __git_find_on_cmdline error
body: <p>I am trying to get git autocomplete working with zsh and am running into a weird error (even though the autocomplete appears to complete successfully):</p>
  <p>Installation:</p>
  <pre class="lang-sh prettyprint-override"><code>mkdir -p ~/.zsh
  cd ~/.zsh
  curl -o git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
  curl -o _git https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh
  </code></pre>
  <p>Added to <code>~/.zshrc</code>:</p>
  <pre class="lang-sh prettyprint-override"><code>zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
  fpath=(~/.zsh $fpath)
  
  autoload -Uz compinit &amp;&amp; compinit
  </code></pre>
  <p>I open a new shell and run <code>git checkout</code> + &quot;ty&quot; + <kbd>tab</kbd> and I expect it to autocomplete with &quot;typescript&quot; with no errors:</p>
  <pre class="lang-sh prettyprint-override"><code>raine[npm-check-updates]% gc ty__git_find_on_cmdline:[:7: unknown condition: -lt                                    ✓
  __git_find_on_cmdline:[:7: unknown condition: -lt
  __git_find_on_cmdline:[:7: unknown condition: -lt
  pescript
  </code></pre>
  <p>It does autocomplete to &quot;typescript&quot; but with an error in between, right where I hit tab. What is causing this and how do I make it go away?</p>