zsh-workers
 help / color / mirror / code / Atom feed
From: Klaus Ethgen <Klaus@ethgen.ch>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Bart Schaefer <schaefer@brasslantern.com>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Bug in function in function
Date: Fri, 20 May 2022 18:25:18 +0100	[thread overview]
Message-ID: <YofO/r45jWmIix2u@ikki.ethgen.ch> (raw)
In-Reply-To: <CAHYJk3RnXpq-ebshqr7DWpFN7-UTYhQkV6adyfB8YJe=ec879w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1206 bytes --]

Am Fr den 20. Mai 2022 um 18:16 schrieb Mikael Magnusson:
> On 5/20/22, Klaus Ethgen <Klaus@ethgen.ch> wrote:
> > Am Fr den 20. Mai 2022 um 16:37 schrieb Bart Schaefer:
> >> On Thu, May 19, 2022 at 12:34 PM Klaus Ethgen <Klaus@ethgen.ch> wrote:
> >> >
> >> > Now I get an error in the `ls()` line. It is even more strange that I
> >> > don't get an error when compiling it as zwc file!
> >>
> >> What's the error?
> >
> > /home/klaus/.zsh/zshrc/30_aliases:471: parse error near `()'
> >
> > This is the line `ls()`. the first function definition (`cd()`) does
> > work. And when compiling, both work as expected.
> >
> > 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. Change your function definition(s) to
> the form "function ls".

Putting a `function` in front of `ls()` work.

However, I was thinking, `function` (in that context) is deprecated.

Regards
   Klaus
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <Klaus@Ethgen.ch>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 688 bytes --]

  reply	other threads:[~2022-05-20 17:25 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 [this message]
2022-05-20 17:46         ` Peter Stephenson
2022-05-20 17:47         ` Bart Schaefer
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=YofO/r45jWmIix2u@ikki.ethgen.ch \
    --to=klaus@ethgen.ch \
    --cc=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    --subject='Re: Bug in function in function' \
    /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

Code repositories for project(s) associated with this 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).