Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compctl for export (with PATCH)
- X-seq: zsh-users 2505
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: compctl for export (with PATCH)
- Date: Tue, 24 Aug 1999 09:59:14 +0200 (MET DST)
- In-reply-to: Sven Wischnowsky's message of Mon, 23 Aug 1999 16:09:59 +0200 (MET DST)
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
Matthew wrote (in private mail) that the patch didn't fix his problem,
although it did for me. So I looked a agin and found another bug when
completing a parameter with non-empty prefix. I'll discuss with him if
that fixes it...
Anyway, this patch is needed for old-style completion anyway.
Bye
Sven
P.S.: One day I'd like to remove compctl, probably first replacing it
with a (autoloaded) shell function that creates new-style
functions on the fly.
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Mon Aug 23 16:11:04 1999
+++ Src/Zle/zle_tricky.c Tue Aug 24 09:55:21 1999
@@ -800,10 +800,12 @@
/* Get the prefix (anything up to the character before the name). */
isuf = dupstring(e);
untokenize(isuf);
- *e = '\0';
+ sav = *b;
+ *b = *e = '\0';
ripre = dyncat((ripre ? ripre : ""), s);
ipre = dyncat((ipre ? ipre : ""), s);
- ripre[b - s] = '\0';
+ *b = sav;
+
untokenize(ipre);
}
else
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author