Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Restrict named directories to scalar parameters set to a path
- X-seq: zsh-workers 54766
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Philippe Altherr <philippe.altherr@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Restrict named directories to scalar parameters set to a path
- Date: Sat, 13 Jun 2026 13:28:48 -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=9J1YfaKLRMx9ywoKhvkRiKjwkFXkoiAnEkmdg5jaOwk=; fh=RngAOd9wlRc8Glv1v2GOfDUnq2FsyrczungEY8JNfXY=; b=QpFJWsJsW5fFZts+J18TuTZ7ArOckwzXOrVPWa4xvyDVesQufwII0M6gPH/ajbUs57 7gVeeqo8Uu/PU2frveBFGPgsXaMNkiWzSRTLQPd8AZcj1gx5nt602gcBD65ovddXcpcW vNA6J/ehhB1ceiVVtqvagbvYIBJ1wHnqBm7eiLPD4GCdnYBBk33hJ/eD9uMwUupZuccW k3Xl8o5+BQjXNTNu01UPXxkCLSfVPrB4c5QeSZvnQr1UPG/IJnzZ7O/fNEmrvzzMtpjL SlySd6ICzurgGrjYNvBgVWchdi5ILJolxJLE05MEaGSZZsC6CIsGzoYJ6Kl5mxAvGHik VZFw==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1781382540; cv=none; d=google.com; s=arc-20240605; b=g8sKrMrIYO3rYa2veOtnCnM8w4qLM7kqfxLmcAhfJImps6VsaZfgwYq3gZlwJDcDRm 8/aFWWoq50mVsnR8+u/t1vVI4PlIOXnaasLiX2NUTMtq650tIVdt9qsXK7H1dbcvS6iJ 05aQwNNosGzW5ilxJMQn2f75P6Y7+CyjqSlltAXNF5tvrM+uMWkaTIcvwR13Hz5EEXVv 5mHMCfWojsDurgTa1nKAiiIiDnW9pnXcU7ds3CGajaw9IbXT61OIrU9hf0ghGLvMXdMF QzcSyC2lcoEuFw6CrTXxAT1Lp7vkrQyI2vn37HKYgv2CB4ji0VnYqMyKS5+05wj+k5IC LceA==
- Archived-at: <https://zsh.org/workers/54766>
- In-reply-to: <CAH+w=7aUsjFqO9gJ6a8eLQ3h9tfbChBC9Q0pAF1SD060=q0C5Q@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAGdYchsE0HGgk2VXPU2NANUcO1WfKDmEYmneuxOfU-1ihO0WGA@mail.gmail.com> <CAH+w=7aUsjFqO9gJ6a8eLQ3h9tfbChBC9Q0pAF1SD060=q0C5Q@mail.gmail.com>
On Fri, Jun 12, 2026 at 2:44 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Jun 12, 2026 at 12:52 PM Philippe Altherr
> <philippe.altherr@xxxxxxxxx> wrote:
> >
> > The documentation of AUTO_NAME_DIRS states that any parameter set to an absolute path becomes a named directory but currently setting any value turns the parameter into a named directory.
>
> Could you please describe how to reproduce the "before" scenario that
> inspired this patch?
Looking at this in the context of workers/54765 (my reply to
workers/54759), the problem appears not to be that "setting any value
turns the parameter into a named directory" -- I cannot make that
happen -- but rather that assigning any value other than a path
REMOVES an existing named directory.
This seems unambiguously correct to me, in contrast to the nameref
case in 54759 which at least has the argument that initializing a
nameref is not altering a "real" parameter.
However, this does make me think that 54759 should (if the behavior is
changed at all) be a case of "is not a nameref" rather than "is a
scalar". That is, creating an array dx after establishing a nameddir
~dx should in fact remove the nameddir. The case where the array is a
local is already handled by workers/54328.
What have I missed?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author