zsh-workers
 help / color / mirror / code / Atom feed
* Patch: select
@ 1998-03-06 11:37 Bernd Eggink
  0 siblings, 0 replies; only message in thread
From: Bernd Eggink @ 1998-03-06 11:37 UTC (permalink / raw)
  To: Zsh-workers

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@rrz.uni-hamburg.de
http://www.rrz.uni-hamburg.de/eggink/BEggink.html


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-03-06 11:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-03-06 11:37 Patch: select Bernd Eggink

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).