the bash manual says that BASH_SOURCE shows filename where a function is
defined (and not the filename from where the function is called).

http://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html
#index-BASH_005fSOURCE-174

as Barre said in comment #2 you can check the filename from where the
function is called by checking index 1 in the array. the array is
ordered after FUNCNAME which is a call stack of bash functions. look for
FUNCNAME in the bash manual page linked above.

marking as invalid.


** Changed in: bash (Ubuntu)
       Status: New => Invalid

-- 
BASH_SOURCE is not correct
https://bugs.launchpad.net/bugs/318678
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to