Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: What's the equivalent of ${BASH_SOURCE[0]}?
On Sat, Mar 16, 2024 at 2:33 AM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> I'm looking for the name of the *sourced* script. So it would be
> something like $ZSH_SOURCE (if it existed).
I'm back to $funcstack[1] then.
% echo $'print -l $funcstack' > /tmp/saymyname
% Src/zsh -fc 'source /tmp/saymyname'
/tmp/saymyname
Messages sorted by:
Reverse Date,
Date,
Thread,
Author