title: in zsh, how do I do a conditional on the exit status of a program?
body: <p>I want to do something like:</p>
  <pre><code>if [[ git status &amp;&gt; /dev/null ]]; then
     echo &quot;is a git repo&quot;;
  else
     echo &quot;is not a git repo&quot;;
  fi
  </code></pre>
  <p>except I don't know how to check the exit status. How do I fix this?</p>