Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: functions -t
On Wed, Oct 13, 2021 at 11:46 AM Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
>
> nice, thanks!
>
>> % f(){}
>> % functions -T f
>> % which f | sed -n 2p
>> # traced
It'd be a bit better to use "functions f" here rather than "which",
so that you don't end up doing a path search etc. if "f" is not a
function.
[[ $(functions -x0 f) = *$'\n# traced\n'* ]]
is probably good enough. I'm debating whether this is commonly needed
enough that the "# traced" comment should appear in the $functions
hash. I suspect not.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author