# fd=0; [ -t "${fd}" ] || [ -p /dev/stdin ]
[ -t 1 ] && expr "$-" : '.*i' >/dev/null
# check if this is a login and/or interactive shell
[ "$0" = "-bash" ] && export LOGIN_BASH=1
echo "$-" | grep -q "i" && export INTERACTIVE_BASH=1
