Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Shell: test for bash or zsh
if [ -n "$ZSH_VERSION" ]; then
# assume Zsh
elif [ -n "$BASH_VERSION" ]; then
# assume Bash
# asume something else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.