if $(tty -s) || [ "${0:0:1}" = "-" ]; then
# Remember if nocaseglob was on.
shopt -q nocaseglob
nocg=$?
# Turn it off so we source stuff in the right order.
shopt -u nocaseglob
if $(tty -s) || [ "${0:0:1}" = "-" ]; then
# Remember if nocaseglob was on.
shopt -q nocaseglob
nocg=$?
# Turn it off so we source stuff in the right order.
shopt -u nocaseglob