zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Klaus Ethgen <Klaus@ethgen.ch>
Cc: Mikael Magnusson <mikachu@gmail.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Bug in function in function
Date: Fri, 20 May 2022 10:47:07 -0700	[thread overview]
Message-ID: <CAH+w=7ZXaiAGhJfzc40hBvimdo3GOX6=ZRNK-m=cY-bqavLmUA@mail.gmail.com> (raw)
In-Reply-To: <YofO/r45jWmIix2u@ikki.ethgen.ch>

On Fri, May 20, 2022 at 10:25 AM Klaus Ethgen <Klaus@ethgen.ch> wrote:
>
> Am Fr den 20. Mai 2022 um 18:16 schrieb Mikael Magnusson:
> > On 5/20/22, Klaus Ethgen <Klaus@ethgen.ch> 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.


  parent reply	other threads:[~2022-05-20 17:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 19:34 Klaus Ethgen
2022-05-20 15:37 ` Bart Schaefer
2022-05-20 17:12   ` Klaus Ethgen
2022-05-20 17:16     ` Mikael Magnusson
2022-05-20 17:25       ` Klaus Ethgen
2022-05-20 17:46         ` Peter Stephenson
2022-05-20 17:47         ` Bart Schaefer [this message]
2022-05-20 18:14           ` Klaus Ethgen
2022-05-20 18:36             ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7ZXaiAGhJfzc40hBvimdo3GOX6=ZRNK-m=cY-bqavLmUA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=Klaus@ethgen.ch \
    --cc=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).