2 ms·
[[ "$BASH_SOURCE" == "$0" ]] && hello || true
[[ "$BASH_SOURCE" == "$0" ]] && hello || true
true will run if hello fails. if...else and &&..|| are not equivalent.
Bug: return code of hello will be ignored. Moreover, it's better to use nop: ":" instead of "true".
Correct version:
[[ "$BASH_SOURCE" == "$0" ]] && { main "$@" ; exit $?; } || :