Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug in function in function
- X-seq: zsh-workers 50271
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Klaus Ethgen <Klaus@xxxxxxxxx>
- Cc: Mikael Magnusson <mikachu@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Bug in function in function
- Date: Fri, 20 May 2022 10:47:07 -0700
- Archived-at: <https://zsh.org/workers/50271>
- In-reply-to: <YofO/r45jWmIix2u@ikki.ethgen.ch>
- List-id: <zsh-workers.zsh.org>
- References: <YoabreuaHY2ZI9YW@ikki.ethgen.ch> <CAH+w=7YfpaYmhrTmt63qoBao7rVotYWRNzctg+mvDJMj-hEywQ@mail.gmail.com> <YofL+a8Neg86Iwv6@ikki.ethgen.ch> <CAHYJk3RnXpq-ebshqr7DWpFN7-UTYhQkV6adyfB8YJe=ec879w@mail.gmail.com> <YofO/r45jWmIix2u@ikki.ethgen.ch>
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