Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Patch: select
- X-seq: zsh-workers 3796
- From: Bernd Eggink <eggink@xxxxxxxxxxxxxx>
- To: Zsh-workers <zsh-workers@xxxxxxxxxxxxxxx>
- Subject: Patch: select
- Date: Fri, 06 Mar 1998 12:37:16 +0100
- Organization: Regionales Rechenzentrum der Uni Hamburg
- Sender: rz2a022@xxxxxxxxxxxxxx
Here is a patch against zsh-3.1.2-zefram3 that makes select behave
according to the documentation (don't print the select list again after
non-empty user input).
---------------- %< --------------------
--- loop.c.old Fri Mar 6 12:14:41 1998
+++ loop.c Fri Mar 6 12:19:40 1998
@@ -156,9 +156,9 @@
lastval = 0;
pushheap();
inp = fdopen(dup((SHTTY == -1) ? 0 : SHTTY), "r");
+ selectlist(args);
for (;;) {
do {
- selectlist(args);
if (empty(bufstack)) {
if (interact && SHTTY != -1 && isset(USEZLE))
str = (char *)zleread(prompt3, NULL, 0);
@@ -180,6 +180,8 @@
}
if ((s = strchr(str, '\n')))
*s = '\0';
+ if (!*str)
+ selectlist(args);
}
while (!*str);
setsparam("REPLY", ztrdup(str));
---------------- %< --------------------
Regards,
Bernd
--
Bernd Eggink
Regionales Rechenzentrum der Universitaet Hamburg
eggink@xxxxxxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html
Messages sorted by:
Reverse Date,
Date,
Thread,
Author