Created
July 27, 2019 15:10
-
-
Save mattmc3/59094afc5aac08ac3e6f16d4c93e99af to your computer and use it in GitHub Desktop.
Shell: test for bash or zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -n "$ZSH_VERSION" ]; then | |
# assume Zsh | |
elif [ -n "$BASH_VERSION" ]; then | |
# assume Bash | |
else | |
# asume something else | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment