title: choosing between $0 and BASH_SOURCE
body: <p>How does one choose between <code>"$0"</code> and <code>"${BASH_SOURCE[0]}"</code></p>
  
  <p>This description from <a href="https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html#Bash-Variables">GNU</a> didn't help me much.</p>
  
  <pre><code>    BASH_SOURCE
  
   An array variable whose members are the source filenames where the
   corresponding shell function names in the FUNCNAME array variable are
   defined. The shell function ${FUNCNAME[$i]} is defined in the file
   ${BASH_SOURCE[$i]} and called from ${BASH_SOURCE[$i+1]}
  </code></pre>