Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: Getting context sensitive glob expansions using new completion
- X-seq: zsh-users 4106
- From: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: martin.ebourne@xxxxxxxxxxxx, zsh-users@xxxxxxxxxx
- Subject: RE: Getting context sensitive glob expansions using new completion
- Date: Fri, 10 Aug 2001 18:40:24 +0400
- Importance: Normal
- In-reply-to: <OFA283F88D.853C8B12-ON80256AA4.004C4A5B@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
>
> completer
> :completion:* _expand _complete _ignored _approximate _prefix
> glob
> :completion:*:expand:* 1
> tag-order
> :completion:*:expand:* all-expansions expansions original
>
> I also have menu completion switched off at all times (apart from
> _approximate).
>
> So then when I type eg.
> ls *<tab>
> the * is expanded immediately into a full list of files (by _expand,
tab
> being mapped to complete-word).
>
> This is what I want for ls. However, in general I would like the *
> expansion to be the list of things valid at the point rather than
always a
> list of files, which is what I currently get.
>
That is what _match is for. I personally find unconditional _expand on
every TAB bad idea - you always have ^Xe (or ^XE) for that.
zstyle ':completion:*' completer _oldlist _complete _match
_oldlist makes sure that you are using original expansions when
continuing completion (else second TAB may complete too much).
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author