Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possible bug in 5.8
- X-seq: zsh-users 27426
- 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 19:26:27 +0100
- Archived-at: <https://zsh.org/users/27426>
- In-reply-to: <CABA_rhDUsQCr5AfsWSiktjncjjzwd=eTb=OYhyC7p_RHvSxOgA@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CABA_rhBmM7pivrZ9jXCaUV1M18_e7d+iEU2m6tCnH=eMjme-Gw@mail.gmail.com> <CAN=4vMruW3wh0dwN8yPAUiZ8Mzki9Lj98-_6mKmvNMuX9N9ELg@mail.gmail.com> <CABA_rhDUsQCr5AfsWSiktjncjjzwd=eTb=OYhyC7p_RHvSxOgA@mail.gmail.com>
[cc:zsh-users] to let everyone know the problem is solved
On Mon, Dec 20, 2021 at 2:50 PM Simon Chatterjee <jal@xxxxxxxxxx> wrote:
>
> Thank you! Yes this is totally user error.
>
> Simon
>
> On Mon, 20 Dec 2021 at 13:28, Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > 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