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 580 invoked from network); 22 Jan 2023 22:28:43 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Jan 2023 22:28:43 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1674426523; b=ZRtGwSSt2xS6zByim+RORWnwl5Ox6Z/iuG6lNRqVWcuJ2oqsnHZhojURycgOeZon1DVFfM+zfa x7A8sqc0u3D4SNoicgZjzQo9sus4TPbl7wy9zuppxI8Khbp6TWzchrteWwyP5UEwopO74yRroJ BJyikz4tys/juPQXKjhb3MlhkS3kAzYR5LNKPbiNcBEx7D5GcUJOEp5jEYDvSjeTY96yM4BEU9 H23xOpG0NOLkrVoNQZdMol7Xtr+a/FllBjL/HPBikYixsYGyv90uelL2+74gZMBcqgbXoz7rz0 7deVPUmi0witGdHUR2NI5zp5dOPV/VzCzG15k2FlaUjD6Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f51.google.com) smtp.remote-ip=209.85.208.51; 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=1674426523; bh=g8NN6Aj6NPuUKPa/J9t2D2XsaQRtp8/fk5FtbCrb92A=; 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:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=czL3H51VvxReisjiXWMWA4RRKOHMxxBbjDQypbUw8JPlLR58Scwc84erEIMqtnQ/esk+htcriD NcNC1WGSFN6DSPY7o5DGV9to+AMb63ptm4ze2xCATP8WCPhTv8Qm1+YarkERWGkjC0yijsM5OI 7kwGFiikorzeyIdYesb+M6BeDcxZdJIX2fjvM8gMUjKTAtJ/uysEJZS1srIqehMPPbId859oPN YPVv6vqP7UqwlgeDc8UboOgKX7v0WO7XAgoSThZGfLQDJkssSix/VA6LFi+spuEoMVcRQMNhOt pcl0OBVl+Ua8OeCsavCncnQ67yCWQki9O/4wabWzg72rnA==; 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:In-Reply-To:References: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=/XHNeVlFJJFH2XzWVXewaUr8VrNPWSL87bWignTySsk=; b=GABU5+mYbKDuklUyraGo2fLQTQ eOr0Ah4r1LyvG+wTtWmsWGdPcNekLF6m/lcv2oAw8p7aGIhjJUVegD2/efDjUGD+FR4sExMQMWlCb hik5mbP+Xp8G0xkTgkXPIcPyhSdVf+aVkiR1Y6jFQWQ0tzC3F1g/ntN+VGgCUIgLrzOEMN7jrVtej wAxmdozpMHFrB3vcPMa8ro+Ihs5jWk329n5CLTlWoOtcVxHepCKPsCuJcxXU2yX2Q0ozvIBsYAh6v yDj83OL9Dxy0r/Vjs//UAHr66n3ZVzcLlmO0cCki3Bo8r9B7r6sMJDzcELEc4QLdP20R6jL+M6yW3 Foa30i9A==; Received: by zero.zsh.org with local id 1pJipO-0004Q9-RA; Sun, 22 Jan 2023 22:28:42 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f51.google.com) smtp.remote-ip=209.85.208.51; 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-ed1-f51.google.com ([209.85.208.51]:42602) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pJioi-0003hr-NK; Sun, 22 Jan 2023 22:28:01 +0000 Received: by mail-ed1-f51.google.com with SMTP id v30so12604148edb.9 for ; Sun, 22 Jan 2023 14:28:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=/XHNeVlFJJFH2XzWVXewaUr8VrNPWSL87bWignTySsk=; b=KO/F37uo3sMg6ff7F+6LBpV3YENoXxCrrGg0lBoOjEzBAa2J3uN5/kqvGy7IYyy1/i OWxG9PvlOMYVgOQtjGxBBnkzhx+61sKln4iTIl1MKpTtBaggzCdN+omZMiE+06bxDoLy HMfEENyY+KNSHLlNWbH8VRXzcsrYmu7ME6F2r7OlrzW6gjtLuM+/ZfXYAV+8TVPH00C6 9eSw99WSzmeFK7uc4FCTPrvYgLzLRkW7/hWY7ro+sjjFmwhleQIsS7YMR6SHj8bw0FJz PHdR6tKTTjRoV4TQSPiXbuaSCIt55KH8+r+p0GUmIa4XzUXtPY5lR/dRRLW/akX0Vt5F 9BhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc: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=/XHNeVlFJJFH2XzWVXewaUr8VrNPWSL87bWignTySsk=; b=0hvlNPjMBOswum2lVV1NvEy+I8irgYv0h3V4FNr5UF/CxIwrH3BS/0Mk/keayITO6N oO4wb7UOPo/UEZ514zOh+g2T5147uqLpDue937YlHkQsqa6aYlWjA8cpv5Xzc1nMVKAd +CLzk16xq1hQbraKQRapIePaZXhUDNAAcU/6uRAenMRctQVWHcMaKGTCHisVIhuk5rEQ oX1OtQR4lJ8pFfZxdp0Clgt6nLrS+iBIC0tlo93eeaju2iUL24UP8w8gOAuoYjE0PdhV 4q7MaxDzoCQjsCdzUfIsAicrOmExnXZJXC05YoqljEBJ24Vs8RBy4WVNLJ07XaHSWhcC sxCg== X-Gm-Message-State: AFqh2kr4PCJi553qM5lT8936FX6df1H4i6ZD1tH+L0YFSGhiiWIasajS PN3F6edJAyt7zv7nJ3D+S0SNpDsZLJoiNSju8zwisA== X-Google-Smtp-Source: AMrXdXtn5zB1LzUmYKfJrqbvkqjDky1YbZ8mjsSj21bhSpMlRjvJeOkifIs0TftSjnCgx/HREBfCDlVYUxD7WRhs4Jc= X-Received: by 2002:a05:6402:90f:b0:499:ed85:a354 with SMTP id g15-20020a056402090f00b00499ed85a354mr2359174edz.241.1674426480140; Sun, 22 Jan 2023 14:28:00 -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 14:27:48 -0800 Message-ID: Subject: Re: path PATH To: Roman Perepelitsa Cc: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28725 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 2:03 PM Roman Perepelitsa wrote: > > I think it would be better for this function to pretend that those > function-scoped parameters don't exist. I'm not happy about that because there's no way to distinguish them without hard-coding a list of names, which (unlikely as this might be) is not future-proof. If they were tagged -local in $parameters that would make more sense (but that'd mean adding a bunch of extra cases to zsh/parameter, it just moves the problem). And $? $_ $- aren't really function-scoped anyway. > If it were a builtin, it could > describe parameters such as `ARGC` or `1` in a way that makes sense Don't have to worry about positionals, they're not in $parameters to begin with. > but here the caller can only get confused if any answer is returned > for them at all. There's no reason not to return the ${(t)...} info. I'm tempted to just decide that if that includes "special" then any reported value is caller-beware.