Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: The emulation rabbit-hole RE typeset/unset
- X-seq: zsh-workers 47696
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Subject: Re: The emulation rabbit-hole RE typeset/unset
- Date: Sat, 28 Nov 2020 08:56:12 -0800
- Archived-at: <https://zsh.org/workers/47696>
- Archived-at: <http://www.zsh.org/sympa/arcsearch_id/zsh-workers/2020-11/CAH%2Bw%3D7a0midnHPULDn7tOwSS_fA0cL_zNdvz12pUS47Rgwcc0w%40mail.gmail.com>
- Authentication-results: zsh.org; iprev=pass (mail-oo1-f49.google.com) smtp.remote-ip=209.85.161.49; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- 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=89i7lXqrNBC867prE4d0TiST29cEReaUdAMQ1XgIBLo=; b=B4rTo7KAkONzXV2UduP0XSLk+y4q9X9OcY8fFxl1RhXI01UIQtjD6+IK4QnpMwt73d Wbyw68lHNQzqdyIf/7yRrjFUetpptAS94KH68Vka+40eJkDOXEmRXX72bcrD4uAAzJ5S gvQSSmzrqXNdv/OMxXGn0a4qvJx/MPGvFvansjkWyVNxra7m2jSAZv6OWeTeU9xplDWF 7wAERXYSHC8sSiWZAzfq4bQmWhQFE1zqFVCNg3vIQSte6C53N0bB98ZVeE90ZtDYINni QUw7ixfICHrzanrVeUPUGnSARzArZ664UwICuMRmpxvRoYTk4AsF2f2gwgeKd1+pGxg8 76/g==
- In-reply-to: <CAMP44s1b5N2_PfmQEgvXhdGzcXgLOK6i1CpABfo-XK=RGf-hRw@mail.gmail.com>
- List-archive: <http://www.zsh.org/sympa/arc/zsh-workers>
- List-help: <mailto:sympa@zsh.org?subject=help>
- List-id: <zsh-workers.zsh.org>
- List-owner: <mailto:zsh-workers-request@zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-subscribe: <mailto:sympa@zsh.org?subject=subscribe%20zsh-workers>
- List-unsubscribe: <mailto:sympa@zsh.org?subject=unsubscribe%20zsh-workers>
- References: <CAH+w=7Zag5MG5D=cRS2UMSsqJ0t=iw5MH9j8=HBO1Q77nbs03w@mail.gmail.com> <20201125131921.vay7h3xk5qn4odgg@chazelas.org> <CAMP44s0-ki=TBzTwnqx10FcTLX4mbphwN88UCx0+h97JTecBWA@mail.gmail.com> <CAH+w=7bs9E7whJLugMLOXG05R-2S8Hjt+OOKK_KN+SMxv-Vvaw@mail.gmail.com> <CAMP44s2Ge-pOn1-gEXkq=oJX7ohL-b_20s9mJZAo1LB=ow+Duw@mail.gmail.com> <CAH+w=7bHCrpwbkZBOgwjwF7M9uo+1_ZEa53hxSwE2fuuBuQfyw@mail.gmail.com> <CAMP44s0WSt_J7TjyPEKvH9TxzWBvTVFTB-pK26G+9SacYeQrAw@mail.gmail.com> <CAH+w=7YtBvrpuXUM=MuHVRuBjf8uiRozKLJsHvYXJr9Cx=J-rQ@mail.gmail.com> <CAMP44s3s0dXtirZhi5e_Tir+3KKn2Kw4hseEj0uH12a7HB5Y=Q@mail.gmail.com> <CAH+w=7ZVthOMB=jJ+KkU1WipL2mbCgD69HfUtxGnu6Mbx1rOog@mail.gmail.com> <CAMP44s2ZJg75KEh+vL+EUOgJUF+oB6TLn5-1h55ktcKR67ZeJg@mail.gmail.com> <CAH+w=7arBoRxmFRH7wL_Sh-0tRe1Xyo_GKze+jkSdvYep7NMWg@mail.gmail.com> <CAMP44s1i6uC72LhqGmt_hg-YUoFtJTKcC6o2qTGLHZJ3tB56CA@mail.gmail.com> <CAH+w=7ZxhRr1TYFe_SuKaT5TKsceh7RDTeQ-hfcZF08ctWeTvg@mail.gmail.com> <CAMP44s1Vb7BLHMaJTVwA=y1X3+UuocA3PGCuGVJRDMHAaG7zwg@mail.gmail.com> <CAH+w=7aQ_pNqHtgEqV6s02Z+V6Aih2g8hebMbjxHgdYJVKXYFQ@mail.gmail.com> <CAMP44s1b5N2_PfmQEgvXhdGzcXgLOK6i1CpABfo-XK=RGf-hRw@mail.gmail.com>
- Sender: zsh-workers-request@xxxxxxx
On Sat, Nov 28, 2020 at 3:36 AM Felipe Contreras
<felipe.contreras@xxxxxxxxx> wrote:
>
> An integer is not a "simple scalar", and seems to be useful unset.
>
> Or am I missing something?
Two things. Possibly three.
One, 'the only useful "declared but not set" variable is a simple
scalar' was a statement on the ambiguity of the austin-group proposal
that you excerpted, which explicitly made "declared but not set"
equivalent to "unset".
Two, that neither bash nor ksh actually does make those two things
equivalent. Variables in bash and ksh can either have both properties
and values, or only properties, or neither. Variables in zsh
currently have only the two states of both or neither, because the
latter is the definition of being unset.
This is what we've been saying all along -- zsh currently has no
provision for representing "only properties", and consequently the
only way to get any of the behavior of the properties settable by
typeset options is to provide a default value. The only thing zsh can
currently represent independent of some value is function scope.
Three, maybe, is that math expression context has a special definition
of the meaning of an undeclared name, which is not the same as the
definition in the rest of the shell. It's not a parameter expansion
in the normal sense.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author