* Re: accept-and-menu-complete in braces and suffixes
@ 1999-03-09 15:43 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-03-09 15:43 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* accept-and-menu-complete in braces and suffixes
1999-03-09 14:50 Fun with new completion Sven Wischnowsky
@ 1999-03-09 15:16 ` Andrej Borsenkow
0 siblings, 0 replies; 2+ messages in thread
From: Andrej Borsenkow @ 1999-03-09 15:16 UTC (permalink / raw)
To: Sven Wischnowsky, zsh-workers
> P.S.: The senders in the summary of my mail reader look like a party
> of ping-pong between Andrej and me...
It's actually my first day with new completion. So far I just try to get the
same environment I had before (with some additional benefits :-)
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.
cheers
/andrej
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-03-09 15:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-09 15:43 accept-and-menu-complete in braces and suffixes Sven Wischnowsky
-- 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
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).