From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: zle parameters in completion widgets
Date: Mon, 1 Feb 1999 09:15:58 +0100 (MET) [thread overview]
Message-ID: <199902010815.JAA02863@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: "Bart Schaefer"'s message of Fri, 29 Jan 1999 09:04:12 -0800
Bart Schaefer wrote:
> On Jan 29, 11:08am, Sven Wischnowsky wrote:
> } Subject: PATCH: zle parameters in completion widgets
> }
> } Now, to get completion only on the second tab, just add
> }
> } [[ "$WIDGET" != "$LASTWIDGET" ]] && return
>
> Actually, the request as for completion on the first tab, but autolist
> only on the second tab.
[That would be only `setopt LIST_AMBIGUOUS'.]
After playing with bash a bit, it seems that to fully copy the
behaviour one would have to setopt LIST_AMBIGUOUS and use something
like:
lastbuffer='' # non-local variable definition
...
completion-widget() {
...
[[ "$BUFFER" = "$lastbuffer" && "$WIDGET" != "$LASTWIDGET" ]] && return
...
}
At least I get completion of the unambiguous stuff on the first tab,
nothing on the second and the list on the third.
> So it'd have to be something like
>
> [[ "$WIDGET" != "$LASTWIDGET" ]] && complist ...
>
> where "..." gets filled in appropriately for whatever other completion
> is in progress. Right?
See above. Also: to allow the completion widget to say if only
something should be inserted or if also the list should be shown, we
would need a way to control this kind of stuff from the widget. This
is on my wish list (it also appears somewhere in my longish
description mail), but not yet implemented.
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~1999-02-01 8:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-01 8:15 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-01-29 10:08 Sven Wischnowsky
1999-01-29 17:04 ` 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=199902010815.JAA02863@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).