From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id EAA02139 for ; Sat, 24 Aug 1996 04:01:51 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA21249; Fri, 23 Aug 1996 13:58:30 -0400 (EDT) Resent-Date: Fri, 23 Aug 1996 13:58:30 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199608231757.TAA23333@bolyai.cs.elte.hu> Subject: Re: Semantics of compctl -X To: gjb@moa.cs.duke.edu (Greg J. Badros) Date: Fri, 23 Aug 1996 19:57:27 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu In-Reply-To: from "Greg J. Badros" at "Aug 22, 96 07:35:19 pm" Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL16 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"FAAbH2.0.uB5.55V7o"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2058 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > It seems that the behaviour of -X "Explanation" compctl flag has changed > since 2.5.03. It used to work like this: > > compctl -X "Testing" howdy > howdy > > - would give : "Testing" > > Now, in Zsh3, however, it appears to *not* echo anything unless it's got > something to complete. It broke long ago when Zefram reorganized zle_tricky a bit. It is surprising that nobody noticed this since than. The patch below should fix it. I'm not 100% confident that this is the right way to fix it so any better solutions are welcome. Zoltan *** Src/zle_tricky.c 1996/08/11 19:15:35 2.72 --- Src/zle_tricky.c 1996/08/23 17:40:00 *************** *** 2136,2145 **** strcpy((char *)line + wb, (char *)line + we); we = cs = wb; } ! if (nmatches>1) /* There are more than one match. */ do_ambiguous(); ! else { /* Only one match. */ do_single(amatches[0]); invalidatelist(); --- 2136,2145 ---- strcpy((char *)line + wb, (char *)line + we); we = cs = wb; } ! if (nmatches > 1) /* There are more than one match. */ do_ambiguous(); ! else if (nmatches == 1) { /* Only one match. */ do_single(amatches[0]); invalidatelist(); *************** *** 2147,2155 **** } /* Print the explanation string if needed. */ ! if (!showinglist && expl && nmatches!=1) { int up; trashzle(); clearflag = (isset(USEZLE) && termok && --- 2147,2156 ---- } /* Print the explanation string if needed. */ ! if (!showinglist && expl && !nmatches) { int up; + feep(); trashzle(); clearflag = (isset(USEZLE) && termok && *************** *** 2953,2959 **** ccsuffix = cc->suffix; validlist = 1; ! if(nmatches && !errflag) return 0; if ((isf || cc->xor) && !parampre) { --- 2954,2960 ---- ccsuffix = cc->suffix; validlist = 1; ! if ((nmatches || expl) && !errflag) return 0; if ((isf || cc->xor) && !parampre) {