Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A way to untie -T vars?
- X-seq: zsh-users 28766
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: A way to untie -T vars?
- Date: Tue, 24 Jan 2023 18:54:47 +0100
- Archived-at: <https://zsh.org/users/28766>
- In-reply-to: <CAH+w=7YYJJxDyFZ20ZJ6FwtFzrsCyHb8tNkMNxBQqWSHRNBfpw@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAKc7PVDEmKnY9TiYwaAgvzXEqNhLwZo46paUPjJOz9HsU3_djg@mail.gmail.com> <CAH+w=7YY5F_ZYJgivw9PSjt8PTQ9R+gHF3jnjbBw-LLkEnc2zg@mail.gmail.com> <CAH+w=7bL4txwLp4zFPeDvb6fbYfJV6-mT+S4oFnrJ7cXPZr_Xw@mail.gmail.com> <CAH+w=7a1RHjYSGnY2=dgZn9n1ZgC2PyJQ12imiDU4gLW4q4saA@mail.gmail.com> <CAN=4vMpo9i5qr-HmH2ymaxaJ6hQLg-gThZkSRJvafUEp1oN0ag@mail.gmail.com> <CAP+y1xAJq6TrkbTOSFNs=jbf7_=sTYnj3Y1=qHoF5W4S1r=Zkg@mail.gmail.com> <CAN=4vMq56vaLYud4uX86c_fJOtuAHALGXvDqEb7fEB1-=Ec5ug@mail.gmail.com> <CAH+w=7biHnWJV1=Cxd20xzikc9hk7037Rn4EwLenvyHsiQifmQ@mail.gmail.com> <CAN=4vMpQRirh_m_-G3RQH7fxsMbs=Yh7biuXUbypzMmKG=Q3sg@mail.gmail.com> <CAH+w=7bzka=NBZ1SGRt7Fj65KuC3mmH99E8uyCn=Ff=uFaM58w@mail.gmail.com> <CAH+w=7YSr1RjDi3zXAhBg6unDj0gcjG+DKM5BjKVgoVhoP+Rog@mail.gmail.com> <CAN=4vMr19u2KCjKn_=nSaxZ1XOBTASwu5EPdy1fve4FX9XhVRQ@mail.gmail.com> <CAH+w=7bOHTSAat9+eypbb3kVyZofYG+8_NHtXdzBreT2tutpzA@mail.gmail.com> <1801643545.282032.1674578750345@mail.virginmedia.com> <CAH+w=7YYJJxDyFZ20ZJ6FwtFzrsCyHb8tNkMNxBQqWSHRNBfpw@mail.gmail.com>
On Tue, Jan 24, 2023 at 6:41 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Jan 24, 2023 at 8:45 AM Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> wrote:
> >
> > > On 24/01/2023 16:42 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > > I don't think we're going to have any guarantied parameters. :-)
> > > Guaranteed, maybe.
> >
> > "Use of shell language by users voids guarantee".
>
> There are only 14 words containing "tied" in /usr/share/dict/words on
> my desktop, and a quick scan of words ending in "ty|tie" doesn't yield
> many that can be "tied", and none except "untied" seem likely to ever
> apply.
There is also "array", "scalar" and "left" in the code with a similar
assumption about the future keywords.
If I were writing this code, I would change it without computing
probabilities because it feels wrong to me. I've learned this specific
pitfall a long time ago and since then it jumps out at me when I see
it in someone's code. The fix is fairly simple and would make the code
more explicit, hence easier to understand. It'll be clear that we are
checking for "left" and not for any keyword that contains "left".
Right now I actually don't know what that line does and if there are
keywords that contain "left" but aren't equal to it.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author