zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: PATCH: completion or'ing and grouping
Date: Wed, 04 Nov 1998 12:06:13 +0100	[thread overview]
Message-ID: <9811041106.AA28476@ibmth.df.unipi.it> (raw)
In-Reply-To: "Sven Wischnowsky"'s message of "Wed, 04 Nov 1998 08:56:16 NFT." <199811040756.IAA28828@beta.informatik.hu-berlin.de>

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.<TAB><TAB><TAB><TAB>  ->  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<TAB><TAB><TAB>' 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 <Address 0x7a736878 out of bounds>, 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 <Address 0x200ced08 out of bounds>, 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 <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarotti 2, 56100 Pisa, Italy


  reply	other threads:[~1998-11-04 11:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-04  7:56 Sven Wischnowsky
1998-11-04 11:06 ` Peter Stephenson [this message]
1998-11-04 16:35 ` Peter Stephenson
1998-11-04 18:20   ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
1998-11-05  8:07 Sven Wischnowsky
1998-11-05  8:42 ` Peter Stephenson
1998-11-05  7:57 Sven Wischnowsky
1998-11-04 14:09 Sven Wischnowsky
1998-11-04  7:46 Sven Wischnowsky
1998-11-03 10:55 Sven Wischnowsky
1998-11-03 17:03 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9811041106.AA28476@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).