I'm trying to get a simple if
statement working in both Zsh and Bash but I can't find something to work with both.
# this works with Zsh
if [[ "$TERM_PROGRAM" =~ iTerm\|Apple_Terminal ]]; then echo apples; fi
# this works with Bash
if [[ "$TERM_PROGRAM" =~ iTerm|Apple_Terminal ]]; then echo apples; fi
Cheers.