From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29725 invoked from network); 6 Mar 1998 11:49:25 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 6 Mar 1998 11:49:25 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id GAA08611; Fri, 6 Mar 1998 06:35:06 -0500 (EST) Resent-Date: Fri, 6 Mar 1998 06:35:06 -0500 (EST) Sender: rz2a022@uni-hamburg.de Message-ID: <34FFDFEC.7FBC7EC7@rrz.uni-hamburg.de> Date: Fri, 06 Mar 1998 12:37:16 +0100 From: Bernd Eggink Organization: Regionales Rechenzentrum der Uni Hamburg X-Mailer: Mozilla 4.04 [en] (X11; I; Linux 2.0.30 i586) MIME-Version: 1.0 To: Zsh-workers Subject: Patch: select Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-Message-ID: <"mY_T_2.0.U62.gzz_q"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3796 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu 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