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

Re: Bug in function in function



On Fri, May 20, 2022 at 10:25 AM Klaus Ethgen <Klaus@xxxxxxxxx> wrote:
>
> Am Fr den 20. Mai 2022 um 18:16 schrieb Mikael Magnusson:
> > On 5/20/22, Klaus Ethgen <Klaus@xxxxxxxxx> wrote:
> > >
> > > I have an alias `alias ls="LC_COLLATE=POSIX ls $_ls_opts"` before this
> > > line but that should not interfere the function definition.
> >
> > In fact it should, and it does.

I'm now curious whether this "worked" in a prior version of zsh?  That
is, how long have you had both the alias and the function definition?

> Putting a `function` in front of `ls()` work.
>
> However, I was thinking, `function` (in that context) is deprecated.

No ... in fact, since the introduction of the NO_MULTI_FUNC_DEF
option, using "function" there is there recommended way to create
several functions with identical bodies.

However, you don't need both the "function" keyword and the empty parens.




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