Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Variable fails to increment with lvalue error
- X-seq: zsh-users 29317
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Variable fails to increment with lvalue error
- Date: Mon, 23 Oct 2023 11:21:29 -0700
- Archived-at: <https://zsh.org/users/29317>
- In-reply-to: <CAN=4vMpf=APBM+WwuqC9JcntFcEcBjRRpMXEH7XggbBaAHhXxg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <F6518D8B-3EE2-4552-89CA-035CD50226A3@gmail.com> <CAN=4vMo17fU8fwL55UnQQLR2TfqYRPdjUoY4fLs_Mdfjp-_0Pw@mail.gmail.com> <1372623164.1448847.1698079437641@mail.virginmedia.com> <CAN=4vMpf=APBM+WwuqC9JcntFcEcBjRRpMXEH7XggbBaAHhXxg@mail.gmail.com>
On 2023-10-23 10:03, Roman Perepelitsa
wrote:
Let's ask the OP if this would've been helpful.
Evan, have you read this documentation page? It's available at
Beeeutiful! Only the learner can say if a doc was useful, so ask
him :-)
My two cents would be:
Note further that it would be incorrect to replace tt(val) with tt($val) as the latter is affected by the built-in double quote substitution, so that the arithmetic evaluation does not see the name of the variable but rather it's expanded value. Thus if $val = 0, the latter _expression_ would attempt: 0 = 2 + 1 ... which is obviously nonsense.
... maybe too much hand-holding there? ...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author