* PATCH: for Re: REC_EXACT and AUTO_MENU, and compctl -U too
@ 1998-06-22 6:45 Sven Wischnowsky
1998-06-23 18:43 ` PATCH: " Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Sven Wischnowsky @ 1998-06-22 6:45 UTC (permalink / raw)
To: zsh-workers
Bart Schaefer wrote:
>
> ...
>
> While I'm on the subject of mildly stupid completion behavior, automenu
> in conjunction with compctl -U could do with a bit of work. It'd be a
> lot more useful if menu completion kicked in immediately when compctl -U
> returns multiple matches and automenu is set. Otherwise you lose both
> the set of completions and the nonunique suffix as soon as the first TAB
> is pressed.
>
Sounds very reasonable. And if we want to do it in the drastic way you
described, the patch is pretty simple.
Bye
Sven
*** Src/Zle/zle_tricky.c.old Mon Jun 22 08:23:18 1998
--- Src/Zle/zle_tricky.c Mon Jun 22 08:26:36 1998
***************
*** 2246,2252 ****
{
Compctl cc = NULL;
int oloffs = offs, owe = we, owb = wb, ocs = cs, oll = ll, isf = 1;
! int t, sf1, sf2, ooffs;
char *p, *sd = NULL, *tt, *s1, *s2, *os = NULL;
unsigned char *ol = NULL;
--- 2246,2252 ----
{
Compctl cc = NULL;
int oloffs = offs, owe = we, owb = wb, ocs = cs, oll = ll, isf = 1;
! int t, sf1, sf2, ooffs, um = usemenu;
char *p, *sd = NULL, *tt, *s1, *s2, *os = NULL;
unsigned char *ol = NULL;
***************
*** 2266,2271 ****
--- 2266,2272 ----
if (unset(COMPLETEINWORD) && cs != we)
cs = we, offs = strlen(s);
+ usemenu = um;
ispattern = haswhat = lastambig = 0;
patcomp = filecomp = NULL;
menucur = NULL;
***************
*** 2413,2418 ****
--- 2414,2420 ----
*delit = 1;
*s = '\0';
offs = 0;
+ if (isset(AUTOMENU)) usemenu = 1;
} else
*delit = 0;
*** Doc/Zsh/compctl.yo.old Mon Jun 22 08:36:59 1998
--- Doc/Zsh/compctl.yo Mon Jun 22 08:42:43 1998
***************
*** 353,359 ****
tt(-K) option) which can examine the word components passed to it
(or via the tt(read) builtin's tt(-c) and tt(-l) flags) and
use its own criteria to decide what matches. If there is no
! completion, the original word is retained.
)
item(tt(-y) var(func-or-var))(
The list provided by var(func-or-var) is displayed instead of the list
--- 353,362 ----
tt(-K) option) which can examine the word components passed to it
(or via the tt(read) builtin's tt(-c) and tt(-l) flags) and
use its own criteria to decide what matches. If there is no
! completion, the original word is retained. Since the produced
! possible completions seldom seldom have interesting common prefixes
! and suffixes, menucompletion is started immediatly if tt(AUTO_MENU) is
! set and this flag is used.
)
item(tt(-y) var(func-or-var))(
The list provided by var(func-or-var) is displayed instead of the list
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* PATCH: Re: PATCH: for Re: REC_EXACT and AUTO_MENU, and compctl -U too
1998-06-22 6:45 PATCH: for Re: REC_EXACT and AUTO_MENU, and compctl -U too Sven Wischnowsky
@ 1998-06-23 18:43 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 1998-06-23 18:43 UTC (permalink / raw)
To: zsh-workers
On Jun 22, 8:45am, Sven Wischnowsky wrote:
} Subject: PATCH: for Re: REC_EXACT and AUTO_MENU, and compctl -U too
}
} Sounds very reasonable. And if we want to do it in the drastic way you
} described, the patch is pretty simple.
There's a missing blank line in Sven's patch, which causes it to fail.
The corrected patch follows.
*** Src/Zle/zle_tricky.c.old Mon Jun 22 08:23:18 1998
--- Src/Zle/zle_tricky.c Mon Jun 22 08:26:36 1998
***************
*** 2246,2252 ****
{
Compctl cc = NULL;
int oloffs = offs, owe = we, owb = wb, ocs = cs, oll = ll, isf = 1;
! int t, sf1, sf2, ooffs;
char *p, *sd = NULL, *tt, *s1, *s2, *os = NULL;
unsigned char *ol = NULL;
--- 2246,2252 ----
{
Compctl cc = NULL;
int oloffs = offs, owe = we, owb = wb, ocs = cs, oll = ll, isf = 1;
! int t, sf1, sf2, ooffs, um = usemenu;
char *p, *sd = NULL, *tt, *s1, *s2, *os = NULL;
unsigned char *ol = NULL;
***************
*** 2266,2271 ****
--- 2266,2272 ----
if (unset(COMPLETEINWORD) && cs != we)
cs = we, offs = strlen(s);
+ usemenu = um;
ispattern = haswhat = lastambig = 0;
patcomp = filecomp = NULL;
menucur = NULL;
***************
*** 2413,2418 ****
--- 2414,2420 ----
*delit = 1;
*s = '\0';
offs = 0;
+ if (isset(AUTOMENU)) usemenu = 1;
} else
*delit = 0;
*** Doc/Zsh/compctl.yo.old Mon Jun 22 08:36:59 1998
--- Doc/Zsh/compctl.yo Mon Jun 22 08:42:43 1998
***************
*** 353,359 ****
tt(-K) option) which can examine the word components passed to it
(or via the tt(read) builtin's tt(-c) and tt(-l) flags) and
use its own criteria to decide what matches. If there is no
! completion, the original word is retained.
)
item(tt(-y) var(func-or-var))(
The list provided by var(func-or-var) is displayed instead of the list
--- 353,362 ----
tt(-K) option) which can examine the word components passed to it
(or via the tt(read) builtin's tt(-c) and tt(-l) flags) and
use its own criteria to decide what matches. If there is no
! completion, the original word is retained. Since the produced
! possible completions seldom seldom have interesting common prefixes
! and suffixes, menucompletion is started immediatly if tt(AUTO_MENU) is
! set and this flag is used.
)
item(tt(-y) var(func-or-var))(
The list provided by var(func-or-var) is displayed instead of the list
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-06-23 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-22 6:45 PATCH: for Re: REC_EXACT and AUTO_MENU, and compctl -U too Sven Wischnowsky
1998-06-23 18:43 ` PATCH: " Bart Schaefer
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).