Suppose one sources the script A.sh, which in turn sources a second script, B.sh.Is there anything that can B.sh can do to cause the sourcing of of A.sh1 to terminate, short of exiting the sourcing shell altogether?IMPORTANT: Here I'm assuming no cooperation at all from A.sh.  IOW, assume that A.sh is completely agnostic about what B.sh may do.Of course, if B.sh runs return, the sourcing of B.sh will terminate, but not the sourcing of A.sh.  On the other hand, if B.sh runs exit, not only A.sh will terminate, but also its parent shell.1 I take it as a given that terminating the sourcing of A.sh would automatically cause the sourcing of B.sh to terminate as well.  Please correct me if I'm wrong.
How to terminate sourcing of parent script?
shell script;zsh