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,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5102 invoked from network); 20 May 2023 06:55:16 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 20 May 2023 06:55:16 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1684565716; b=lo87SbAEFICmO8eLy5PfxpCMve+WOt6jB8wNFl7Rzf4i3G32vXr2ye3gwApfNYtdy5LDp452y8 lNS1ABL+9sDZJbJIuU267cNQIVeL/WYsclOQGuS5jm96cVq9FMUFGGLsQhi/r1G51DVUDsopHl Gx5Oq+4XhUAnInSwjh8pG0chPdyF3jOr9j0RzCkjMbYQSz05OUA856ib9AkNg4xcXkx7Y86tjb bJDppT8gGdXLUDXJh6ypf/gWoTHmt4EDGUnU0fw1F4I2Rli/YTz9HCR5fYrFTK1Km0BhyM9xRW kwIYG7WppYUbgHOQF18ul4t5Y0UWHE+IysNSFTTA65lWkw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f46.google.com) smtp.remote-ip=209.85.208.46; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 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=1684565716; bh=pFyhawnwuoajA9sroaj8XikX5/dOaAjmV9udQQS4WQc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=soS/FkuzPqpysCDEV2yxlEfobqHR31O7wvmTA47sx3uzFF3EyZjonEicR59QlbQUiiJpo45zDd XFSPOVNW3S7QPzhHCvLAWVbNn1E+6r8szooOFFdIDMcYTwVrJ3GnZ94cFo0TiCeST4xUee13y5 OKgsHXJuJdrDaSTrZipFVcnxGaOyJUWNqR1LNux+8ZcMmtRcLcUDEgAosPbMLrRZcYVPbslMUc eOA2sNZRtbFdsH/pXfqzcQ+m2eKJ4TWV/Nni6m+O+4dduW/kuu5MgmRzoFo0Ee+Lat8/+VPqKg 7CLPx9cZWYyA6hhEcq9OKVhlUEBs9TAVSKmsIwQeaLTlPA==; 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-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ksbcofpP/jaVQKJMsf6WqRsme+iKT/27vrohbdW1228=; b=Az/ezrissld7i8av0aFGC5evPu EYF9iLAy1mXoGFvW/9vQzJMPv+d9SiG7KmLxXtwfVFWR0yt2b9+04I+p3MgMUeMYZ+jsRDJeE3UoB aePOEdSiPvjdSrQj+S+53LNZWM1m6pXNw5PPoDSQOXPNxA4hOAdYrxWlwfrE8DqUh/vUl9Fh2dyHo y7HYWHJnVKnPUoXYCYNnmv3GKe4h68tjC8qpMPZuVFqfGhab59IPfY03I1YO7U8zecXrxYJxLKkOm owdS0vFYgEI57nP8Eq/BIANHMC3w6CO+rqXxj2jbFjo9h0AfoFDT4ABiI69BePJn0YBO1SB45rIVB VBxQcLzA==; Received: by zero.zsh.org with local id 1q0GUk-0001FB-4M; Sat, 20 May 2023 06:55:14 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f46.google.com) smtp.remote-ip=209.85.208.46; dkim=pass header.d=brasslantern-com.20221208.gappssmtp.com header.s=20221208 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ed1-f46.google.com ([209.85.208.46]:55370) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1q0GU5-0000ti-CK; Sat, 20 May 2023 06:54:38 +0000 Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-50bcb4a81ceso7118527a12.2 for ; Fri, 19 May 2023 23:54:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20221208.gappssmtp.com; s=20221208; t=1684565671; x=1687157671; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ksbcofpP/jaVQKJMsf6WqRsme+iKT/27vrohbdW1228=; b=R+Xt3t0WawE8ka2rUpZ61wDF9NCTWB8Ij/a3pPsZ9U0NIag4uLGRlYiiVZ4jMB0Io8 IYNDTnPmMEEFm7D/c7v5Ja9wh0SOoNfH0MD2Vc7seCTv40ic7ptV8Cv76kDcfritzg1Z wEbps7av55DvwShAKmK6Bna2bKoy7xK0luvz3n3p+HWez/NCeEn9UsPkb+RitOyEs/TW sqp3jXiKpkD+dKf4BK4lQPyVzWI5pK1+olM1w2541+i8XBtLK4O36vcqs3LVUsKuxZZR genOBq2Y6E9v/z0GzSaLAsMvEI2d0c2m7mfM1BxXmYDrI69ufjfclhIk6JBe9Xxoo5o9 a6hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684565671; x=1687157671; h=content-transfer-encoding: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=ksbcofpP/jaVQKJMsf6WqRsme+iKT/27vrohbdW1228=; b=lF6WlA2SjzRdFnpVx1LmExkk/rgz0moWZa9HGyREZfCgVN97vgQs5ozgGcjyBIqqBV S5atxCfVxX4sIvRzLHPyPzF//lv+dwPjAjAWx5Huyj3WCbRKHUQ2vRuNkj7Ej6KZq+kd J+t5vAfaNWK5AuNWfT28WPOTmUhKSitecEbk6+WLIITUHqE15Rbd1umwDQOAw4ZztaZp bJVWsByJwc/Fo76OPlvoXYPGXou2qQO7ABt+QHrvNvbVHXdhGJsGWLlnZNjbFfi6ckPd sEF5kK60hWCVz5uofx6QLMh3BagqjLQvyxVjIF9+bliYL1pFtVBhmePZ3UYikJkeTW7B qt2g== X-Gm-Message-State: AC+VfDzilTot4aox+/JpkTZApSh2hqXE5OowL4gCUf9CJw8r0mJTcn5N zVXjs2FVKpXFNpa/ST2nA0Q03pVmRW5gH/NQIjS4ceQ3fzVqNUAuHIU= X-Google-Smtp-Source: ACHHUZ5qxyziu3APMwdeD3Z+QCOlYhZZ0t7w5wIAzQH6ECQYhoSv8uDVX5uyBin4k1Cc+syr38CdPXH3m3050tdM268= X-Received: by 2002:a17:907:7da7:b0:96a:e022:6486 with SMTP id oz39-20020a1709077da700b0096ae0226486mr4271774ejc.2.1684565670761; Fri, 19 May 2023 23:54:30 -0700 (PDT) MIME-Version: 1.0 References: <26170-1678007435.186071@mDq6.Euc0.bAwZ> <52850-1678055097.553101@HAUa.4aGe.fmcC> In-Reply-To: From: Bart Schaefer Date: Fri, 19 May 2023 23:54:16 -0700 Message-ID: Subject: Re: [PATCH 1/3] Extended ksh compatibility: namespace parameter syntax To: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 51766 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, May 19, 2023 at 7:06=E2=80=AFPM Phil Pennock wrote: > > AFAICT, in zsh, .a.b=3Dc is assigning to var b in namespace a, while a.b= =3Dc > is setting the b attribute of the compound variable a. As presently implemented, there's no difference. The latter is supported by the parser but should be considered a reserved syntax; some sort of compound variable feature is a possible future application. > I think that you can use a set of namespaces for subsystems and have > bound names (aliases) from the main namespace to those for existing > behavior, unless an emulate directive says to be particularly strict. Yes, that's one of the possible uses of named references. > Then you could have the completion system switch away from littering the > main namespace with _foo functions, by moving completion functions into > the namespace Function names already are (always were) more flexible than variable names. We could have used ".comp.foo" instead of "_foo" from the beginning, if that had been thought more important than brevity at the time. In retrospect it might have been nice to have distinct name(space)s for "completers" vs. "completion functions". The missing bit for functions is that a leading "." doesn't hide the function from the "functions" command the way it hides variables from "typeset". > and all sorts of cache variables there, which has the > added bonus that leaks in user written completions won't pollute the > main namespace. Yes, there are a number of places where globals could benefit from hiding.