From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 30812 invoked from network); 27 May 2022 11:09:39 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 May 2022 11:09:39 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1653649779; b=CTK/SbSEtioOcjHA6LvnJGMxKt7pUySQcqO1058XTh7NrFivoyJ0M69ziBmqcLFrGkz9dZJP/g zCshIbaO20Qtx0BXQNwUIAx+75n8BLe6Y2RshhXj6DE+HkNIBEkc5czdp2LTFhPBV/msJtbGoP i+1sEfnpSYQBaScmJqX6g+x61iEvQsL/rzvTRZ0ZuQyrmixy2dG9dbdcoKi8l6PzrLP+625PKh 3SwN/ux/JAxahp7dGH4vesvvbcw/l4K3fq8GewsRpCxqvrtkWJf/VxYE+N9ab16k5vDF4gT0n8 CK0gK0lkkkRDXVvS04A3bPuuzTILE58KKnh/cYnBDNaOGQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-pl1-f169.google.com) smtp.remote-ip=209.85.214.169; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1653649779; bh=fIm0fY+u+RQv27UC1KGHbMjS3r2PDT/+F7+M796HHus=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:References: In-Reply-To:MIME-Version:DKIM-Signature:DKIM-Signature; b=o4cmHFwn1yRK/rpirQ7/dqmP6vL4ecDIYQkRyVTwpd9vqLeohxUL77Op5r3XEOB3msDKZmJJuu EHb5pdVI74AFhPimHgTGAUVKv8wYVjciPE6vpD93yXzWELS98uYA+TC9r2MafK35fVrXHclcZI riL2WBB9UgYmhRt9KlOFUnH6FQEOrfhURf+hrQF2AEUSGoswmWjx3Yb+LE+FrFhRxH8AWpsNt6 x5rozqbtbgZQD5fw/9LolyKsdT2vmTUjFtzVkjzJPn9r7ljrdJDlK54G2BXqrpkKcg/0i8vEcy trgHbfl6V9At/7mVgalSuW9HgU/LDnBRjHnpsRx5AmAq8w==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:References:In-Reply-To:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Juk2LV2OhMbh854oy9cxV41cwrTIvNZ2a4vUl5NxWHg=; b=I6+h2gmtXTtvixzR0WG7H6KVje Itk5BfHG95huwJgbQO1LDQUipUQhsEU3Inlh3p6ikf+maMZfoGOo6M4FZ7AFQjRzmiorJxudLoSIC Q8TdYRUQ/KMLxaHTrTOSTd6rTJ8Ds5KYhVV7zfv/kZW8x5um2RsqaVJOHXiGePHW0Uny7Syw7Xrwn AkeXmXz2wBCT94UiVKfNjTbJn5R58yOBIff2T+zCpfPTkklMEs7TRxMzCU+EIUYN3mPZr2zECC485 KF60ZAEL/Bf2CZzKlaFAsfJAQRI0l2AIXk4xyVaPGZOJojEbd2K5JUvBGQWRY4MzLLO/M7ZW+elMW Imv3zOkw==; Received: from authenticated user by zero.zsh.org with local id 1nuXqd-000J4r-3f; Fri, 27 May 2022 11:09:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-pl1-f169.google.com) smtp.remote-ip=209.85.214.169; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-pl1-f169.google.com ([209.85.214.169]:40640) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nuXpk-000INt-B0; Fri, 27 May 2022 11:08:44 +0000 Received: by mail-pl1-f169.google.com with SMTP id i1so3862749plg.7 for ; Fri, 27 May 2022 04:08:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Juk2LV2OhMbh854oy9cxV41cwrTIvNZ2a4vUl5NxWHg=; b=j/sZWNO7doCjfwQ/bNyX0PX2m0eOtNSL99PBuLFx7pHgBNpYz2lXHfcFNperIFa+8u zHFVhp4bPQkX5N4sfv9yNEcKU4ROcPtFALFeFyFOA7++un6xGcjCb5DZ8+FnWxuaadv4 iSG9aTv/Ur8TvjOA6M3wMSTYhnxsOpFdk0+tV+Pi5rx23+OBMdvVdMec9P7NTesQ4nNK Kj2bp480m5xTu/JIEAHE3JdnORwVG5mTY1f+eE+0xcfg+OElpTcpBVaUcHnfyku0LnCr EykaVd8CPZsBaiCSI+Ck811tnEuZCY/VFR07toJzDkMZrzay1pWhuQu2gVhSDgnr08pL g0Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Juk2LV2OhMbh854oy9cxV41cwrTIvNZ2a4vUl5NxWHg=; b=yEhtoalDdqlYfN/zQm2lxhnmiBCsA9Gd0ih6kYYNZHU4l9V+5fxZscu7O93J5lIJ// hqmDaz3BIIY5F+ETlGESpFKIACJWXL34xFDUQ2x1JbUkN1Z2lzv0MvLAFq+8WKX239u5 wdJmNS+uEJY4rrsx4eSseWmlXd+GKOnwGxHuzdArvKy4SRgjg10DvRmRPkx+jtwSuMuG mudjTmHYEiifXTRGeB/vDRV53Vnl4Hw6MX2Gu6E8d9N0IR6xBrmFu1fgcDUBefKh6eoj 3SQOowgOWCBV+vlCle4RlwFEYZUdfqAKF5wmtAIHgC/TN7Gj8rMz425AXwtprPrydhHy ExNA== X-Gm-Message-State: AOAM531axejFM7MhZ4jpNI7EdXZrVP8kaGpim+GDE3XqNv/z5TUBDb1p ohP1BZIFVFtbtHA79hWTm45j7Yt4GqMQSfUfr/o= X-Google-Smtp-Source: ABdhPJzV0JC5iPGfmtFn3haTtECnh5yniob962qTzg0PRWfh1GminKfeJOHlW5aWtRn3O0LJGBifheU+CW9L7ZIqoDs= X-Received: by 2002:a17:90a:1911:b0:1df:b08a:e252 with SMTP id 17-20020a17090a191100b001dfb08ae252mr7835884pjg.215.1653649722924; Fri, 27 May 2022 04:08:42 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:8c26:0:0:0:0 with HTTP; Fri, 27 May 2022 04:08:42 -0700 (PDT) In-Reply-To: References: From: Mikael Magnusson Date: Fri, 27 May 2022 13:08:42 +0200 Message-ID: Subject: Re: Function names prefixed with "%" To: Bart Schaefer Cc: Zach Riggle , Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27813 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 5/27/22, Bart Schaefer wrote: > On Thu, May 26, 2022 at 6:15 PM Zach Riggle wrote: >> >> It seems that it's completely valid to declare a function with a leading >> percent, but it's not able to be called due to be interpreted as job >> control. > > The very first entry in Etc/BUGS says: > > The pattern %?* matches names beginning with %? instead of names with at > least two characters beginning with %. This is a hack to allow %?foo job > substitution without quoting. This behaviour is incompatible with sh > and ksh and may be removed in the future. I think this is unrelated, the problem Zach has is that % %foo() { echo hi }; %foo outputs fg: job not found: foo While the bug is that % echo %?foo outputs %?foo instead of zsh: no matches found: %?foo eg, the ? in %?* is not a pattern character effectively. You can combine these two problems but the result is quite anti-synergistic: % %?foo() { echo hi } % %?foo fg: job not found: ?foo % echo %?foo %?foo -- Mikael Magnusson