Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [Language Design] Should inline assignments create local parameters?



On Fri, Aug 14, 2026 at 3:18 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> Is it "inline assignment" or "prefix assignment"? I came up with the former but you used the latter. Is the latter the official term? Which term should I use in tests and comments?

The POSIX spec calls them "Assignment preceding command name" which
seems closer to "prefix" than "inline".

> An inline assignment of a special parameter is doing about the same as a local redefinition. Both suffer from the same issues. My solution for inline assignments moves the specialness to the assigned instances of the parameters. Therefore, it makes sense to also move the specialness to localized parameters [...]
>
> Tied parameters are a complicating factor for both [...] things get much simpler by assuming that assigning/localizing one of the tied parameters also assigns/localizes the other one, which is similar to unsetting where unsetting one also unsets the other.

This sounds OK to me, but again I don't want to be the only vote.
(More remarks in the "localized special" thread)




Messages sorted by: Reverse Date, Date, Thread, Author