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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29253 invoked from network); 22 Jan 2023 21:57:48 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Jan 2023 21:57:48 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674424668; b=Q4FT/2Y0UG6M7xX+wekNP+DJQKr2MMfdKjZjyvUoeLKMs8jTmxKCc29CiDN+PoLsnq7Xa+QUiJ PlbHIfibSmFemnq4nqxL1yT8ajzjcRlwB6MU0kPlbZJ9emyfg7N7Ljyq2Y0QkaWsHaqsNrfiu6 2PD58WhtFPXsK8GkZT2dZrzt8UseBM8shfYxg5+pryL5iEEcZr0MXkMEEUqIDq74tkbFeC8doF 6q5dcc6/eLW/Xu5iL8+ubo4ffWZMZeyYobJ0S9GJJEC16Pgv2FEe/c5kef/sE3Yeap6kbCDZq1 rhP25BDqRWeC5LnakNvf9zKtjFCn/aCcPXVwwv9YWRISfA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1674424668; bh=nUW0xdgU4ifKa8lhoO7NBfBCnYOQanwgJnQTaxYRknk=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=YrhzS/ykz/emj4BMTIjZ9ijwqZquEC/i3henP+fMWImRxNskILivgw+0MuCvLv6xHsgzgd4aj6 nkImOJ8LWSbEFZqAEqEKFSPc+RAZa6dSactqVzext2ZFbBYIfN4PimMBy8muieNuKAjjsXtDXY Xta5mWLVm2zvHA+QvSD/LkAaJ28tY3KXCd0oymJb0G+IGF38hdCM0zpeZonx2KxEIqHYq55Luj yWpTsVRPpiclNPeLFsMGyb81WtmEooZZfFDTUX2Qp+T9WxbFXmOT0St3nX30EtTiKPwrWAheq9 bZtYGT7wujNWheY5se4B+K12krnWonamJgTbg031EHiHTg==; 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:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=pV6SCGtu3+ek4qQ8iNVrVf383pJ+pkd9FjFEojychms=; b=Z66SIDxnecuzE9KNLM1Efvrzfw yuqbODGAqkfnnehX0RrtArZ6Z/E9jwdv2Fir4v6EMDJ5a3QMA+4QTLCKfrXSvGC267P/rg/WgNS+Y eGkopNgVVeL+mgYamd9mcdCFcg8pNvAb3pbH+ChxdvoafNearmih95uxQsbPHqoTR+esrOeYYMmdq /BvgUtER+hVhb4HZvHH1UT3pX3UhUi7+WNffzPhyVtZiHMcAdL/rI4jmFHq1zUW34Xj7IiRiKey97 ooaN5+Aq8V077RPCD5BF7rK/uVHsW3MtknArTGNAuhmY8JDK/cIcPM9NM/Vfgs6kNJQsT0O+iDa/X faA1yEpg==; Received: by zero.zsh.org with local id 1pJiLT-0001Kd-Ms; Sun, 22 Jan 2023 21:57:47 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f54.google.com) smtp.remote-ip=209.85.218.54; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f54.google.com ([209.85.218.54]:40809) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pJiKl-0000c6-Dh; Sun, 22 Jan 2023 21:57:04 +0000 Received: by mail-ej1-f54.google.com with SMTP id mp20so26098761ejc.7 for ; Sun, 22 Jan 2023 13:57:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=pV6SCGtu3+ek4qQ8iNVrVf383pJ+pkd9FjFEojychms=; b=uI0z/mDto/eQQQs7qJPQO8s9Ms4vL4YmJ+Kt/IGfThuhruX2q3Tjk6TcGt1ejKoJOE Hqfg1cnVNyBY1+vU22FLCvON8Ht7h+ZdJj/kn3gbhMQuOIOIvKPeImOUnE3ZfVoSm//5 HbhN7iF6veHvDFaFOb0DZhJQj8qPthqwz98CHdeARO7PivNsCwyHM48wbnirRAny0o5A AzOKPweckS+Hunx+0mm8OG/P3iPacZ6IQ0FVCqMCPT7PTbkoDnKkdFiZbkVNdYxCLnSX nr8OT92mwwuJxgXI+axmLN7LlkEEGMC8UJ/b21Yk4RQT5V6T5yYEXokI1QGx7pkXIy1H 0MKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pV6SCGtu3+ek4qQ8iNVrVf383pJ+pkd9FjFEojychms=; b=kunExYVvoaFpKHpWbY8DbrW/peTvkQGD65LTEyvWd6hzeffCwwqBYct9mmqZ81OX9K HjcHpKFqEqMEK6sFiTvZTfw0wBkgi0HM9SJ/dI9+KDZjR4yS79KYizJ3ZWfZW3Omw19b ngMo8Sw9W0du4pQth+GMGRwoLo0WWE8Mt2RzQAsfgrKWXytC0+wFDQKFOJoC45lVXKWN MRd6nSaGs0m4EOASxOQwjIGWxGwq3m6iNW0NOatdepqyrd2zgkfZMUBu+nOceBWdEJJw G6cSx/rphFOZGbDitpDYORhVkfO1VMr6of32FOvQo5Md14sI8pt/yEftrkRXai3a1538 gUSw== X-Gm-Message-State: AFqh2kqziJpIHmdNRCPriifrjVAwVX5Tt5PHnpcvyON849eyghEHN6ul jI53D6jxXy2H2WZ+xWwjlGPDbyXkzEGlLofw6DzWdXKLY3dCnmlw X-Google-Smtp-Source: AMrXdXvV5IJRxUFkid8OT6bGr1Q4bTPjGoGpDi/8HhgqnVCEqw25v81LHJl9uERmXNqu+VofVuTLHkZUEihhWSfOQTM= X-Received: by 2002:a17:907:1ddd:b0:865:acb:babf with SMTP id og29-20020a1709071ddd00b008650acbbabfmr2185521ejc.374.1674424623038; Sun, 22 Jan 2023 13:57:03 -0800 (PST) MIME-Version: 1.0 References: <0dc71450-d082-93da-52f8-d4e6b97199af@eastlink.ca> <378fcf6a-edb0-885b-3d08-9ebee33bb911@eastlink.ca> <3885c637-c56f-2bb7-9a89-02009254ed75@eastlink.ca> <3b93f68e-d090-15c0-c15e-a3d09d702f76@eastlink.ca> <07323898-9985-4e9f-8b54-c08fd8510fe8@app.fastmail.com> <08102bc6-b331-504f-fcd5-28fa3cdb0e2f@eastlink.ca> In-Reply-To: From: Bart Schaefer Date: Sun, 22 Jan 2023 13:56:51 -0800 Message-ID: Subject: Re: path PATH To: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28723 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 Sun, Jan 22, 2023 at 12:03 PM Bart Schaefer wrote: > > % describe-params 0 > scalar-special 0=describe-params > > Would it be better to use POSIX_ARGZERO to reveal the name of the > shell itself? There's no way from inside a function to grab $0 from > the caller unless the caller itself asserts NO_FUNCTION_ARGZERO. Similar silliness that it may not be possible to fix, so maybe the above isn't worth considering: % describe-params '(#i)arg*' \? integer-readonly-special '!'=0 integer-readonly-special '#'=10 array-readonly-special '*'=( '*' - '?' @ _ '$' 0 ARGC argv ) scalar-readonly-special -=569XZfims integer-readonly-special '?'=1 array-readonly-special @=( @ _ '$' 0 ARGC argv ) scalar-special _=_ integer-readonly-special '$'=394907 scalar-special 0=describe-params integer-readonly-special ARGC=2 array-special argv=( argv ) In case not obvious what I mean, $* and $@ and $argv should all have the same elements, and $# and $ARGC should be equal to one another and to the number of elements in the first three, but this can't be preserved while using ARGC and shift to walk the names. Also, $? is nonzero because of the "if" test, and $_ is _ because that's the last word of the command that prints the value of $_. It's like trying to examine quantum superposition.