From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: accept-and-menu-complete in braces and suffixes
Date: Tue, 9 Mar 1999 16:43:59 +0100 (MET) [thread overview]
Message-ID: <199903091543.QAA15388@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Andrej Borsenkow"'s message of Tue, 9 Mar 1999 18:16:04 +0300
Andrej Borsenkow wrote:
> This is with zsh -f:
>
> itsrm2% l {Commands/ESC-RETURN
> Commands/ Core/
> itsrm2% l {Commands/,Core/
> Commands/ Core/
>
> The slash is removed if I type anything but not with
> accept-and-menu-complete.
Not with anything, but with a comma and a brace, so a-a-m-c should do
the same, right.
`iremovesuffix()' has a new argument now, saying if the list of
matches should be kept.
Bye
Sven
diff -u os/Zle/zle.h Src/Zle/zle.h
--- os/Zle/zle.h Tue Mar 9 15:56:55 1999
+++ Src/Zle/zle.h Tue Mar 9 16:39:11 1999
@@ -125,7 +125,7 @@
/* Standard type of suffix removal. */
-#define removesuffix() iremovesuffix(256)
+#define removesuffix() iremovesuffix(256, 0)
/* Cut/kill buffer type. The buffer itself is purely binary data, *
* not NUL-terminated. len is a length count. flags uses the *
diff -u os/Zle/zle_misc.c Src/Zle/zle_misc.c
--- os/Zle/zle_misc.c Tue Mar 9 15:56:55 1999
+++ Src/Zle/zle_misc.c Tue Mar 9 16:39:27 1999
@@ -42,7 +42,7 @@
int neg = zmult < 0; /* insert *after* the cursor? */
int m = neg ? -zmult : zmult; /* number of copies to insert */
- iremovesuffix(c1);
+ iremovesuffix(c1, 0);
invalidatelist();
if(insmode)
@@ -849,7 +849,7 @@
/**/
void
-iremovesuffix(int c)
+iremovesuffix(int c, int keep)
{
if (suffixfunc) {
List l = getshfunc(suffixfunc);
@@ -876,7 +876,8 @@
int sl = suffixlen[c];
if(sl) {
backdel(sl);
- invalidatelist();
+ if (!keep)
+ invalidatelist();
}
}
fixsuffix();
diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c Tue Mar 9 15:56:56 1999
+++ Src/Zle/zle_tricky.c Tue Mar 9 16:39:40 1999
@@ -463,7 +463,11 @@
return;
}
if (brbeg && *brbeg) {
- int l = (brscs >= 0 ? brscs : cs) - brpcs;
+ int l;
+
+ iremovesuffix(',', 1);
+
+ l = (brscs >= 0 ? brscs : cs) - brpcs;
zsfree(brbeg);
brbeg = (char *) zalloc(l + 2);
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-03-09 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-03-09 15:43 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-03-09 14:50 Fun with new completion Sven Wischnowsky
1999-03-09 15:16 ` accept-and-menu-complete in braces and suffixes Andrej Borsenkow
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=199903091543.QAA15388@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--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).