From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@math.gatech.edu
Subject: PATCH: for Re: REC_EXACT and AUTO_MENU, and compctl -U too
Date: Mon, 22 Jun 1998 08:45:04 +0200 (MET DST) [thread overview]
Message-ID: <199806220645.IAA08265@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Fri, 19 Jun 1998 11:14:59 -0700
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
next reply other threads:[~1998-06-22 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-22 6:45 Sven Wischnowsky [this message]
1998-06-23 18:43 ` PATCH: " Bart Schaefer
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=199806220645.IAA08265@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--cc=zsh-workers@math.gatech.edu \
/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).