but @lightsofapollo $0 works just fine here, right? It's simpler than using BASH_SOURCE, and it works everywhere. I don't get why both of you really want to keep BASH_SOURCE.