zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: ymmt@camille.is.s.u-tokyo.ac.jp
Cc: zsh-workers@math.gatech.edu
Subject: Re: bug in select
Date: Mon, 30 Dec 1996 00:15:15 +0100 (MET)	[thread overview]
Message-ID: <199612292315.AAA01569@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <199612290328.MAA00797@verdy.is.s.u-tokyo.ac.jp> from Yamamoto Hirotaka at "Dec 29, 96 12:28:22 pm"

> Hi,
> 
> I found a buggy feature in zsh's `select' built-in command.
> here's the log.
> 
>    verdy% select i in aaa bbb ccc
>    do echo $i
>    done
>    1) aaa  2) bbb  3) ccc  
>    ?# 1
>    0

I bet that i is integer here.  Look:

hzoli% select i in aaa bbb ccc
do echo $i
done
1) aaa  2) bbb  3) ccc  
?# 1
aaa
1) aaa  2) bbb  3) ccc  
?# 

hzoli% integer i              
hzoli% select i in aaa bbb ccc
do echo $i
done
1) aaa  2) bbb  3) ccc  
?# 1
0
1) aaa  2) bbb  3) ccc  
?# 

Ksh behaves exactly the same way.  This is not a bug.  Add unset i before
select and it'll work.  Note that i becomes integer if it is initialised
first in an arithmetic expression, like let i=0 or $((i=0)).

Zoltan


  reply	other threads:[~1996-12-30  2:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-29  3:28 Yamamoto Hirotaka
1996-12-29 23:15 ` Zoltan Hidvegi [this message]
1998-07-01 18:21 Bug " Bernd Eggink

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199612292315.AAA01569@hzoli.ppp.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=ymmt@camille.is.s.u-tokyo.ac.jp \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).