* PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
@ 1999-11-03 11:53 Sven Wischnowsky
1999-11-03 16:40 ` Bart Schaefer
0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 1999-11-03 11:53 UTC (permalink / raw)
To: zsh-workers
Andrej Borsenkow wrote:
> 3.1.6-bart-8 just compiled and installed.
>
> ...
>
> Case 1 (O.K.)
^^^^^^
Uff. Good. ;-)
> bor@itsrm2:~%> l /t/s/z/f/_<TAB>
> bor@itsrm2:~%> l /tools/share/zsh/functions<CURSOR>/_
> functions/ functions.old/
> Now press cursror-right,TAB
> bor@itsrm2:~%> l /tools/share/zsh/functions/_
> zsh: do you wish to see all 194 possibilities?
Remember this line...
> so far so good
>
> Case 2 (strange)
> bor@itsrm2:~%> l /t/s/z/f/_<TAB><TAB>
> bor@itsrm2:~%> l /tools/share/zsh/functions<CURSOR>/_
> functions/ functions.old/
> ^^ highlighted
> Now press "/" (accept-and-infer-next-history)
> bor@itsrm2:~%> l /tools/share/zsh/functions/_a2ps
>
> Oops! No more completion there inside /tools/share/zsh/functions
Because (as it said above), there are too many matches to display
them. I was aware of this when I wrote that code but didn't know what
to do - -so I just made it give up. But what do you think, it should
do? It *can't* display the menu in this case... Should we disallow
a-a-i-n-h in this case? I think this would be even weirder.
> Case 3 (weird)
> bor@itsrm2:~%> l /t/s/z/f/_<TAB><TAB>
> bor@itsrm2:~%> l /tools/share/zsh/functions<CURSOR>/_
> functions/ functions.old/
> ^^ highlighted
> Now press RETURN, TAB
> bor@itsrm2:~%> l /tools/share/zsh/functions.old/_
> functions/ functions.old/
> TAB once more
> bor@itsrm2:~%> l /tools/share/zsh/functions/_
> functions/ functions.old/
You don't like it that it continues menu-completion of the same
matches (because of `oldlist_list=_complete:...'). Yes, I agree, after
a menu-selection we almost certainly don't want to re-use such a old
list.
Bye
Sven
diff -u oldsrc/Zle/complist.c Src/Zle/complist.c
--- oldsrc/Zle/complist.c Wed Nov 3 11:47:59 1999
+++ Src/Zle/complist.c Wed Nov 3 12:46:55 1999
@@ -856,8 +856,7 @@
mselect = -1;
inselect = 0;
if (acc) {
- menucmp = 0;
- lastambig = 0;
+ menucmp = lastambig = hasoldlist = 0;
do_single(*(minfo.cur));
}
if (!noselect) {
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
1999-11-03 11:53 PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities Sven Wischnowsky
@ 1999-11-03 16:40 ` Bart Schaefer
1999-11-03 17:16 ` Andrej Borsenkow
0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 1999-11-03 16:40 UTC (permalink / raw)
To: zsh-workers
On Nov 3, 12:53pm, Sven Wischnowsky wrote:
} Subject: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
}
} > Oops! No more completion there inside /tools/share/zsh/functions
}
} Because (as it said above), there are too many matches to display
} them. I was aware of this when I wrote that code but didn't know what
} to do - -so I just made it give up. But what do you think, it should
} do? It *can't* display the menu in this case... Should we disallow
} a-a-i-n-h in this case? I think this would be even weirder.
How about this: Drop back into regular menu completion and produce the
"do you wish to see ...?" prompt.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
1999-11-03 16:40 ` Bart Schaefer
@ 1999-11-03 17:16 ` Andrej Borsenkow
0 siblings, 0 replies; 4+ messages in thread
From: Andrej Borsenkow @ 1999-11-03 17:16 UTC (permalink / raw)
To: Bart Schaefer, zsh-workers
> On Nov 3, 12:53pm, Sven Wischnowsky wrote:
> } Subject: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
> }
> } > Oops! No more completion there inside /tools/share/zsh/functions
> }
> } Because (as it said above), there are too many matches to display
> } them. I was aware of this when I wrote that code but didn't know what
> } to do - -so I just made it give up. But what do you think, it should
> } do? It *can't* display the menu in this case... Should we disallow
> } a-a-i-n-h in this case? I think this would be even weirder.
>
> How about this: Drop back into regular menu completion and produce the
> "do you wish to see ...?" prompt.
>
Exactly. Actually, I again fail to see, how these three cases differ. In all
cases I first complete the first ambiguous prefix and then want to complete the
rest. The way I leave this first completion (using cursor keys, accept or
a-a-i-n-h) should not matter. IMHO :-)
/andrej
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
@ 1999-11-04 10:33 Sven Wischnowsky
0 siblings, 0 replies; 4+ messages in thread
From: Sven Wischnowsky @ 1999-11-04 10:33 UTC (permalink / raw)
To: zsh-workers
Bart Schaefer wrote:
> On Nov 3, 12:53pm, Sven Wischnowsky wrote:
> } Subject: PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities
> }
> } > Oops! No more completion there inside /tools/share/zsh/functions
> }
> } Because (as it said above), there are too many matches to display
> } them. I was aware of this when I wrote that code but didn't know what
> } to do - -so I just made it give up. But what do you think, it should
> } do? It *can't* display the menu in this case... Should we disallow
> } a-a-i-n-h in this case? I think this would be even weirder.
>
> How about this: Drop back into regular menu completion and produce the
> "do you wish to see ...?" prompt.
Blink. Of course...
Bye
Sven
diff -u oldsrc/Zle/compcore.c Src/Zle/compcore.c
--- oldsrc/Zle/compcore.c Wed Nov 3 12:53:50 1999
+++ Src/Zle/compcore.c Thu Nov 4 11:23:30 1999
@@ -428,7 +428,7 @@
/* If we are doing a menu-completion... */
if (menucmp && *lst != COMP_LIST_EXPAND &&
- (!compwidget || compwidget == lastcompwidget)) {
+ (menucmp != 1 || !compwidget || compwidget == lastcompwidget)) {
do_menucmp(*lst);
return 1;
}
diff -u oldsrc/Zle/complist.c Src/Zle/complist.c
--- oldsrc/Zle/complist.c Wed Nov 3 12:53:50 1999
+++ Src/Zle/complist.c Thu Nov 4 11:30:04 1999
@@ -545,7 +545,7 @@
Cmgroup *pg;
Thingy cmd;
Menustack u = NULL;
- int i = 0, acc = 0, wishcol = 0, setwish = 0, oe = onlyexpl;
+ int i = 0, acc = 0, wishcol = 0, setwish = 0, oe = onlyexpl, wasnext = 0;
char *s;
HEAPALLOC {
@@ -591,7 +591,7 @@
while (mcol < mcols - 1 && p[1] == minfo.cur)
mcol++, p++, pg++;
}
- setwish = 0;
+ setwish = wasnext = 0;
getk:
@@ -634,7 +634,7 @@
}
clearlist = listshown = 1;
mselect = (*(minfo.cur))->gnum;
- setwish = 1;
+ setwish = wasnext = 1;
continue;
} else if (cmd == Th(z_acceptandhold) ||
cmd == Th(z_acceptandmenucomplete)) {
@@ -858,6 +858,11 @@
if (acc) {
menucmp = lastambig = hasoldlist = 0;
do_single(*(minfo.cur));
+ }
+ if (wasnext) {
+ menucmp = 2;
+ showinglist = -2;
+ minfo.asked = 0;
}
if (!noselect) {
showinglist = -2;
diff -u oldsrc/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- oldsrc/Zle/zle_tricky.c Wed Nov 3 12:53:51 1999
+++ Src/Zle/zle_tricky.c Thu Nov 4 11:24:49 1999
@@ -77,7 +77,8 @@
/**/
int usemenu, useglob;
-/* != 0 if we are in the middle of a menu completion. */
+/* != 0 if we are in the middle of a menu completion. May be == 2 to force *
+ * menu completion even if using different widgets. */
/**/
int menucmp;
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-11-04 11:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-03 11:53 PATCH: Re: 3.1.6-bart-8: menu select + oldlist oddities Sven Wischnowsky
1999-11-03 16:40 ` Bart Schaefer
1999-11-03 17:16 ` Andrej Borsenkow
1999-11-04 10:33 Sven Wischnowsky
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).