From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Bug in completion with menucomplete and no insertion
Date: Mon, 07 Jun 1999 17:21:21 +0200 [thread overview]
Message-ID: <9906071521.AA33085@ibmth.df.unipi.it> (raw)
I was just testing the closing-stdin code and I got a command wrong and it
caused a (repeatable) crash. Then I found it works even if I got the
command right(ish).
What I tried first was
% _foo() { compgen -s; } # mistake, of course
% compdef _foo foo
% foo <TAB>
compgen: command string expected after -s
+4:53% foo
compgen: command string expected after -s
Hitting up arrow and immediately typing any insertion key causes the shell
to crash every time. Then I found it did the same with
% _foo() { compgen -s ''; }
(except it was a little more erratic getting it to crash).
Presumably something nasty is happening to memory somewhere before that
point. I checked and it's not even specific to -s: other mistakes in the
get_compctl() called from bin_compgen() do the same thing. The common
factor seems to be that none of the commands produce matches or insert
anything. It seems to need menucomplete set as well; I've reproduced it
after zsh -f, compinit, setopt nobeep menucomplete (nobeep is only
necessary for sanity).
Maybe more will turn up after I compile the new version on a system where I
can use mem-debug.
By the way, I've applied the following trivial patch to zle_tricky.c
for shared-library purposes.
--- Src/Zle/zle_tricky.c.csu Mon Jun 7 13:29:37 1999
+++ Src/Zle/zle_tricky.c Mon Jun 7 14:43:00 1999
@@ -5077,7 +5077,7 @@
}
compquote = ztrdup(compquote);
compquoting = ztrdup(compquoting);
- comp_setunset(0, 0, set, unset);
+ comp_setunsetptr(0, 0, set, unset);
if (unset(COMPLETEINWORD)) {
untokenize(ns);
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
next reply other threads:[~1999-06-07 15:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-06-07 15:21 Peter Stephenson [this message]
1999-06-08 6:58 Sven Wischnowsky
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=9906071521.AA33085@ibmth.df.unipi.it \
--to=pws@ibmth.df.unipi.it \
--cc=zsh-workers@sunsite.auc.dk \
/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).