From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 34a4da74 for ; Mon, 8 Jul 2019 22:13:13 +0000 (UTC) Received: (qmail 1912 invoked by alias); 8 Jul 2019 22:13:07 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44502 Received: (qmail 20200 invoked by uid 1010); 8 Jul 2019 22:13:07 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f45.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25503. spamassassin: 3.4.2. Clear:RC:0(209.85.167.45):SA:0(-0.6/5.0):. Processed in 1.607078 secs); 08 Jul 2019 22:13:07 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.167.45 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=93U8G7/36uNGiu2W85D8Xk31EeuimzJ67S59uINA92s=; b=RINPzS4ihOWIgVqKnuOYekZPuzJt9PRjSyVbBSshinsRpinZzm7da2OKIT8v3vJSlP jzWCiW4bjkcHC+oVHjWQAPlmmseWz//g36Goj7RE67IpNTRrWV4pl5tTv83xEXB8ukOU p4AD2KeWaZ0jbgPcK1xjCdwWdqK+1lwaIrdJqavbLArHAMiU6AYJoAQVfES+yqoTJkP/ dpfHjcBPUZtbOqsfCInRjWueOVsvODP8K/oqXlChQNu4XmLk2kxclNNup2MQx44I7oaP hs45Mx2FLVlKTzv3xhX5MlrsvmK+pJ8MnZlKLfFTYWdi9ApXhreLZWQnsjkrq7Q8+FwD 8igg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=93U8G7/36uNGiu2W85D8Xk31EeuimzJ67S59uINA92s=; b=CDl7xu9YRSngUzA6iCvKa03kFsF7CPAZBAEP31et8j2RRVm4Ast3WJl0rFdktMVXnv vsR2gNRSjuIoOnzd7gCiKUV7Jo+/jpjhRMDn7lXx+0VAkHry5ApPndlNDQSezsaFykmt uc7fSqhUvRnKdnN7yKa8S+kNYn4UhZneAEzRuaiiNHTbCMi2aJ1Wa0PPHuAGsuQ1brtE 8LjlL9JdO9eSnV8I3Ryu0sI9gw9ElkS5UAFz6GJSevYTwfNl+EPqYPovQQqLIYAKWYZU i182EHjepemurdBS01e4ySTMA6OWGm5aGEJvVWcxdDLSBFxhT1WKzvO5h2pYkGMiBfDZ BzuA== X-Gm-Message-State: APjAAAW/qZyJnru7DS5Gl9d/rYhrx6Ct0JnP0dGOM7Ozd1x1VOPG7E6W TgP2SMMN6bGiF8m/GVCVdha0fUQr/38E2V421TjlEA== X-Google-Smtp-Source: APXvYqz/eNOBFvQWMm6FGnFq+jIohPy/V0EskNLsQebPX1o6XeucyjyIHjW8BBmGUAfJR4dwEdo4+P0YYGSgFhyHrl4= X-Received: by 2002:ac2:4c37:: with SMTP id u23mr9184697lfq.119.1562623950338; Mon, 08 Jul 2019 15:12:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Mon, 8 Jul 2019 15:12:18 -0700 Message-ID: Subject: Re: Parse error on autoload -X and a function with & in name To: Sebastian Gniazdowski Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" On Mon, Jul 8, 2019 at 1:03 PM Sebastian Gniazdowski wrote:> > Sadly the same applies to a [] prefix > > On Mon, 8 Jul 2019 at 21:35, Sebastian Gniazdowski > wrote: > > > > I wanted to use the symbol as a namespacer for internal functions. Try this (apologies if gmail line wraps the @@ heading): diff --git a/Src/builtin.c b/Src/builtin.c index 9b9e76c77..7db36c41b 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -3029,7 +3029,7 @@ eval_autoload(Shfunc shf, char *name, Options ops, int func) } if (OPT_MINUS(ops,'X')) { char *fargv[3]; - fargv[0] = name; + fargv[0] = quotestring(name, QT_SINGLE_OPTIONAL); fargv[1] = "\"$@\""; fargv[2] = 0; shf->funcdef = mkautofn(shf);