Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Glitch with "eval" and "autoload"



On Sat, 23 Jan 2016 10:03:11 -0800
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> What's the right way to get the actual function name?  Climbing up the
> fstack looking for strcmp(fsptr->name, "(eval)") != 0 seems pretty ugly,
> but the "ineval" global isn't sufficient for e.g. "eval eval autoload -X".

You shouldn't need to check the name, rather look for (fstpr->tp ==
FS_FUNC).  That ought to be fairly robust.

pws



Messages sorted by: Reverse Date, Date, Thread, Author