Skip to content

Instantly share code, notes, and snippets.

@coopermaruyama
Created July 18, 2015 20:12
Show Gist options
  • Save coopermaruyama/db094c5069176d6ae557 to your computer and use it in GitHub Desktop.
Save coopermaruyama/db094c5069176d6ae557 to your computer and use it in GitHub Desktop.
ZSH Notes
# Using redirection, run a command only if the previous command's exit code is 0,
command &>/dev/null && conditionalcommand
# example:
tmux has-session -t mysession &>/dev/null && echo "mysession exists!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment