Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Inserting all completions
- X-seq: zsh-users 2451
- From: Danek Duvall <duvall@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx (Zsh Users)
- Subject: Re: Inserting all completions
- Date: Mon, 19 Jul 1999 16:03:21 -0700
- In-reply-to: <990719225136.ZM10630@xxxxxxxxxxxxxxxxxxxxxxx>; from Bart Schaefer on Mon, Jul 19, 1999 at 10:51:36PM +0000
- Mail-followup-to: zsh-users@xxxxxxxxxxxxxx (Zsh Users)
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <19990719113013.A29253@xxxxxxxxxxxxxxxxxx> <990719225136.ZM10630@xxxxxxxxxxxxxxxxxxxxxxx>
On Mon, Jul 19, 1999 at 10:51:36PM +0000, Bart Schaefer wrote:
> On Jul 19, 11:30am, Danek Duvall wrote:
>
> > Is there a simple way to insert all the possible completions into the
> > current commandline?
>
> In the new 3.1.6 completion system, you can use
>
> compadd -A the_matches ...
> compadd -UQ "$the_matches"
>
> [ Explanation snipped ]
Hmmm, okay ... I don't want to replace completion with this entirely. I'd
like to have two keystrokes -- one, tab, is the normal completion
mechanism. The second, ^X^I or something, puts all the matches on the
line.
Could I do something like:
function _widget() {
function_to_compute_reply
local -a the_matches
compadd -A the_matches $reply
compadd -UQ "$the_matches"
}
zle -N _widget
bindkey "^X^I" _widget
(I haven't yet migrated to the new completion stuff, so forgive me if I'm
stomping all over the normal usage of compadd ... ;)
The question then is, how to write function_to_compute_reply() in a
suitably generic manner ...
Thanks,
Danek
Messages sorted by:
Reverse Date,
Date,
Thread,
Author