Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
select behaving strange in 3.1.4
- X-seq: zsh-workers 4385
- From: Goran Larsson <hoh@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: select behaving strange in 3.1.4
- Date: Wed, 16 Sep 1998 00:14:47 +0200 (MET-DST)
Look at this:
$ echo $ZSH_VERSION
3.1.4
$
$ cat select_weirdness
#!/usr/local/bin/zsh
PROMPT3="What now?"
select junk in A B C; do
echo $junk
done
$
$ ./select_weirdness
1) A 2) B 3) C
What now?^D <-- enter control-D
$
$ . ./select_weirdness
1) A 2) B 3) C
What now?^D <-- enter control-D
zsh: do you wish to see all 1120 possibilities? y <-- enter y
[[[ list of 1120 executable files, shell builtins, et.al. ]]]
What now?^G <-- enter control-G
$
The zshmisc.1 manpage says about select that
"list is executed for each selection until a break or
end-of-file is encountered."
Now, the control-D did not act as end-of-file here and control-G
isn't mentioned in the manpage, so what is going on?
Even more weird is that by entering this another anomaly shows up:
$ . ./select_weirdness
1) A 2) B 3) C
What now?^C <-- enter control-C
$
$ . ./select_weirdness
1) A 2) B 3) C
What now?2 <-- enter 2
B
What now?^D <-- enter control-D
zsh: do you wish to see all 1120 possibilities? n <-- enter n
What now?^C <-- enter control-C
At this point control-C has stopped working and control-D only
asks stupid questions. No documented way out of select works, so
I have to use the undocumented control-G.
What now?^G <-- enter control-G
$
Who broke select, and why?
--
Goran Larsson hoh@xxxxxxxxxx
I was an atheist, http://home1.swipnet.se/%7Ew-12153/
until I found out I was God.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author