zsh-workers
 help / color / mirror / code / Atom feed
From: dana <dana@dana.is>
To: Mitchell Gildenberg <mgild@google.com>
Cc: zsh-workers@zsh.org
Subject: Re: zsh function declaration bug
Date: Thu, 31 Jan 2019 07:11:15 -0600	[thread overview]
Message-ID: <730BA7F6-5BE4-419D-838E-457B43F93B90@dana.is> (raw)
In-Reply-To: <CAOQ4iAAW7g18YbvH1v2oLNxx4z7jh-5PaR-oWq-j4Mp-FieR+g@mail.gmail.com>

On 30 Jan 2019, at 11:46, Mitchell Gildenberg <mgild@google.com> 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


  reply	other threads:[~2019-01-31 13:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 17:46 Mitchell Gildenberg
2019-01-31 13:11 ` dana [this message]
2019-01-31 14:00   ` 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=730BA7F6-5BE4-419D-838E-457B43F93B90@dana.is \
    --to=dana@dana.is \
    --cc=mgild@google.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).