Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Suggestions for autogenerating function names to wrap the same code?
On Tue, Mar 22, 2022 at 2:06 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
>
> so if you can get all the function names in an array, you could just say:
> task_func_names=( $(script to pull names out) )
> function $task_func_names() {
> task_wrapper.pl $funcstack[1] "$@"
> }
When using the "function" keyword, you don't need the empty parens,
either. That keyword further ignores the state of the MULTI_FUNC_DEF
option, which is what you want if you're using this array method.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author