I have the following in a file which is sourced both by .bashrc and .zshrc. The syntax is from the site.
if $SHELL=/bin/zsh
then
# to not java .class when running java
myclasslist () { reply=(${$(ls *.class)%.class}) }
compctl -K myclasslist java
fi
Both Zsh and Bash go upset of it.
How can you make a if -clause in sh?