1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
set -o functrace fn() { return; } trap "echo fn ; fn" RETURN fn echo after 1 unset -f fn fn() { eval return; } fn echo after 2 unset -f fn