From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18646 invoked from network); 4 Nov 1998 11:29:29 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 4 Nov 1998 11:29:29 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id GAA14635; Wed, 4 Nov 1998 06:21:28 -0500 (EST) Resent-Date: Wed, 4 Nov 1998 06:21:28 -0500 (EST) Message-Id: <9811041106.AA28476@ibmth.df.unipi.it> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: PATCH: completion or'ing and grouping In-Reply-To: "Sven Wischnowsky"'s message of "Wed, 04 Nov 1998 08:56:16 NFT." <199811040756.IAA28828@beta.informatik.hu-berlin.de> Date: Wed, 04 Nov 1998 12:06:13 +0100 From: Peter Stephenson Resent-Message-ID: <"u7xfw2.0.ca3.uY3Gs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4529 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Sven Wischnowsky wrote: > > Second, there seems to be a problem with menucompletion set. It now > > pauses when it gets to an ambiguous completion, and only cycles > > through the next time you hit tab --- in other words it seems to have > > turned into the normal automenu behaviour. > > The patch below fixes this. Thanks, that's now fine. The next thing I've noticed so far with this patch, before I try the next one, is that when attempting an ambiguous completion at the bottom of the screen the cursor moves up a line, even if there isn't anything to be displayed. It seems to be pretty much independent of completion options, happening any time there's more than one possibility for completion. The next is that with these options: noalwayslastprompt off noautolist on noautomenu on nolistambiguous off menucomplete off % mkdir tmp % cd tmp % touch foo.{a,b,c} % compctl -D -f % echo foo. -> foo.xx ^^^^typed by hand, but it doesn't seem to matter so I get two spurious xx's with the cursors after them. With the same options, if I type `echo zsh' in the zsh Src directory (where there is no file zsh, this makes a difference) the shell crashes with the first part of the backtrace as so: #0 0xd000db50 in strlen () #1 0xd1002bf4 in inststrlen ( str=0x7a736878
, move=0, len=-1) at zle_tricky.c:1346 #2 0xd100c430 in do_ambiguous () at zle_tricky.c:3835 #3 0xd1005108 in docompletion ( s=0x200ced08
, lst=0, incmd=0) at zle_tricky.c:1992 #4 0xd1000730 in docomplete (lst=0) at zle_tricky.c:744 #5 0xd0ffee9c in expandorcomplete () at zle_tricky.c:346 #6 0xd0ffa200 in execzlefunc (func=0x7a736878) at zle_main.c:590 gdb shows that firstm->psuf has an illegal value here: if(suflen && !atend) inststrlen(firstm->str + strlen(firstm->str) - suflen, 1, suflen); if (firstm->psuf) inststrlen(firstm->psuf, 0, -1); if (brend && *brend) { cs -= brsl; inststrlen(brend, 1, -1); } in do_ambiguous(). In fact, the whole of firstm seems to be illegal. At other times, I have had it insert another 'zsh', giving 'zshzsh', presumably related to the same bug. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarotti 2, 56100 Pisa, Italy