Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion question
- X-seq: zsh-users 4001
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion question
- Date: Wed, 4 Jul 2001 17:43:17 +0200 (MET DST)
- In-reply-to: <20010704164503.A12032@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
dLux wrote:
> ...
>
> Yes, absolutely. I don't have chance to read the whole zsh
> documentation, it is very huge!
>
> I want zsh to ignore the "local/" part of the example, and complete
> the word as I want...
If you use compctl-based completions, just use another key binding:
bindkey '^I' expand-or-complete-prefix
That `-prefix' means that it will ignore the `suffix', i.e. the part
after the cursor when completing.
If you use the new completion system (the one invoked by `compinit'),
then, as Andrej pointed out, you want to use the _prefix completer which
does the same. You set that up with:
zstyle ':completion:*' completer _complete _prefix
to make it try normal completion (from both ends if `completeinword' is
set) first, or by using the _prefix completer exclusively:
zstyle ':completion:*' completer _prefix
zstyle ':completion:*:prefix:*' completer _complete
(or whichever completer you use or compinstall has set up for you).
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author