Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh function declaration bug
- X-seq: zsh-workers 44027
- From: dana <dana@xxxxxxx>
- To: Mitchell Gildenberg <mgild@xxxxxxxxxx>
- Subject: Re: zsh function declaration bug
- Date: Thu, 31 Jan 2019 07:11:15 -0600
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=qGN/wZ98a7bk/7S8nDEi9hyetqg9M9vZ+s/tB07TGDU=; b=2EUQp716saEBhMANlMLD7BrhgbHsDBSHF+BvNlF90qV3FRdr9UBMBHLznfTl4EMmfn 3rpQIqgGkSFEsjyZ4gyBGRDPmSpy6zWeuGF8N8sgSpVOdFOVV3wRZ1VxHtUeE/d63nzk UgotxNripn/sWyCBOB5t8nW/NHV5FLT73YZzlW1dFsmyHRNExUPMnHWQB/JcBIFkFouC E3d9GR1XSDYbo/RMzIfdt41XJQ8CwcnbvxhUZfNsZyl8qVXHksM+LfRhz7sx+Ujha2ks nqGxaTWzrMhStiCvNHaU6DAlY7rIIckeVWBnElWEj5XwlE8M52oUFjRBiG6CetoIVZsD GPng==
- In-reply-to: <CAOQ4iAAW7g18YbvH1v2oLNxx4z7jh-5PaR-oWq-j4Mp-FieR+g@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAOQ4iAAW7g18YbvH1v2oLNxx4z7jh-5PaR-oWq-j4Mp-FieR+g@mail.gmail.com>
On 30 Jan 2019, at 11:46, Mitchell Gildenberg <mgild@xxxxxxxxxx> wrote:
>➜ mgild $ l(){ echo "hello"}
>zsh: defining function based on alias `ls'
>zsh: parse error near `()'
Presumably you have an alias l=ls, which is being expanded because the l in
l() { ... } is considered to be in command position. workers/40300 made this
an error by default, since the expansion behaviour is generally unexpected
If you don't need the l alias, you can just unalias it. Otherwise it will
work with the function key word like you said, or if you put the definition in
a file rather than entering it at the command line. But i'm guessing you don't
actually want an alias and a function with the same name anyway
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author