Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Fix WATCH/watch tying
- X-seq: zsh-workers 54447
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxx>
- Cc: Philippe Altherr <philippe.altherr@xxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Fix WATCH/watch tying
- Date: Fri, 1 May 2026 19:02:29 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uTFSkDTQM2HHV8045SC+9uFh2K9ASypsul257KYIuOE=; fh=6dxgmKkREVn3UJ7iqJOxNOZsB5MH5kiTAFlr0Ko7IVE=; b=BPZZcD42UxZkczwxPjk6NPXYkZr5bnvwamb0mQd4j44RrrFre3dLpRZMvgHEjEZ/pA DRUZgdgjWCTczKqqxfDVk1rofK2rOvsK9FXRi0D/1wJIvRcsDoNevc/4SsomQ2Idd/2T 0u8hGw/kmhwxyOZ6PdwKlOK+9RkCQrrPD7bYRb+R2zt+f1GQtbMRK9rpEw3/NzbMG1zG VTKUL6uH7YI+3R0fdLjHsr8ys5IhapVAoF+mQg6Hg30l1mcV3MgiN82N6v5W+g1S7ZRk nRWMZlQ/xDGwh/JZP1CcQnqrqpZldnzLlWdvOha24G9aAtJMG0Mja0K+iusWOGJjyo4h mrLA==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1777687361; cv=none; d=google.com; s=arc-20240605; b=ToyCl44c08HVxihYe+BLkxhu+/crqfLsUVxX1+MRsb6w5RQ1xIOcgyXhuo2bd/FTvx pvP/gEhnmXZRI0r+ANGZsXIxs21WqK9pdrJkHZ0KM0IKeaibj7ixDLx4/eaRZoPhq1YU cJA+9zT3i05WywVxOiMm28OcDGP2zKUZ7aj0Cy9KbQ2xX/krg2KsoQYML/M03TV6X9s5 SmVC7e8TqwkIqrY2wu4yi3C3LQu1adpkoW7CvStTWC5035g+CAw5Npxix7NnHgh6h+Fv eWwy9v+VIEDwpKNAGty9dorz+XaHyk4Q0VbTguXkgfyoP5puX1WAUHTBxRWoAD60YdNi dyZw==
- Archived-at: <https://zsh.org/workers/54447>
- In-reply-to: <22680-1777685890.600397@o-H1.fPqQ.i-FW>
- List-id: <zsh-workers.zsh.org>
- References: <CAGdYchvS7FYPj2+4O4wmG_N-PPXjAD4AbmetA3fZH26YadCB4Q@mail.gmail.com> <CAHYJk3S+R8OW8PfbGTpu8X5gFsuUfU=W6CRNNMqv_TbtGZt1pg@mail.gmail.com> <CAGdYchu8=ReJosUGYFs5Jp7tFHCsm-3iJQOpK72H3XShsNVsPg@mail.gmail.com> <CAGdYchv3m_RBO1gRaFXXe_djMTJoqdhB3ZuxqeMfxxxua3SB8g@mail.gmail.com> <10810-1777637314.868283@7Fw5.rY0T.kdGx> <CAGdYchvcZr62xEpwzTu=etF0--_UfE0VETZ6eAXLY4G0HWBifg@mail.gmail.com> <22680-1777685890.600397@o-H1.fPqQ.i-FW>
On Fri, May 1, 2026 at 6:38 PM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> An environment variable doesn't have a type associated with it so it'd
> be a case of limiting this to scalars. From a quick scan, WATCH is about
> the only scalar autoloaded parameter. Otherwise, there's only SRANDOM
> which is readonly. Without loading the module, the shell only knows the
> parameter's name and not the type. Maybe some additional marker can be
> added.
Presuming you mean adding something to watch.mdd autofeatures?
The standard features are builtins, conditions, parameters and
math functions; these are indicated by the prefix 'b:', 'c:'
('C:' for an infix condition), 'p:' and 'f:', respectively,
followed by the name that the corresponding feature would have
in the shell.
So you're thinking something like 'i:' for imported or 'e:' for
environment, or possibly 'P:' for "special parameter"? And the effect
is to cause the module to autoload at initialization when the
environment variable is (about to be) imported?
I don't think there's any way for this to be entirely handled by the
module unless the WATCH environment is ignored until the module loads
... which would probably be OK, actually; why would you expect the
search to work if you never loaded the module? Backward
compatibility?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author