Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possible bug in 5.8
- X-seq: zsh-users 27424
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Simon Chatterjee <jal@xxxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Possible bug in 5.8
- Date: Mon, 20 Dec 2021 14:28:09 +0100
- Archived-at: <https://zsh.org/users/27424>
- In-reply-to: <CABA_rhBmM7pivrZ9jXCaUV1M18_e7d+iEU2m6tCnH=eMjme-Gw@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CABA_rhBmM7pivrZ9jXCaUV1M18_e7d+iEU2m6tCnH=eMjme-Gw@mail.gmail.com>
On Mon, Dec 20, 2021 at 2:18 PM Simon Chatterjee <jal@xxxxxxxxxx> wrote:
>
> Zsh 5.8 seems to have a problem with the variable ‘i’, in a ‘for … in’
> loop, where an item being iterated over starts with a ‘/‘:
>
> % zsh --version
> zsh 5.8 (x86_64-pc-linux-gnu)
> % for p in /; do echo $p; done
> /
> % for i in /; do echo $i; done
> zsh: bad math expression: operand expected at `/‘
Works fine for me:
% docker run --rm zshusers/zsh:5.8 zsh -c 'for i in /; do echo $i; done'
/
Try reproducing this from `zsh -f`. If you cannot, run `typeset -p i`
in your shell. You'll probably see that it's defined. Since `zsh -f`
doesn't have this parameter, it must be defined in rc files.
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author