Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion within word
- X-seq: zsh-users 8030
- From: Joel David Elkins <jde@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion within word
- Date: Mon, 27 Sep 2004 15:34:24 -0500
- In-reply-to: <19431.1096297944@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20040921175108.5a5f7697@xxxxxxxxxxxxxxxxxxxxx> <20040922045511.GA22277@xxxxxxxxxxxxxxxxx> <20040925003747.241f4a2d@xxxxxxxxxxxxxxxxxxxxx> <17298.1096276791@xxxxxxxxxxxxxxxxxxxxx> <20040927160024.5a664979@xxxxxxxxxxxxxxxxxxxxx> <200409271418.i8REIoZf009904@xxxxxxxxxxxxxx> <20040927164336.557f6485@xxxxxxxxxxxxxxxxxxxxx> <19431.1096297944@xxxxxxxxxxxxxxxxxxxxx>
Isn't the colon-variable completion problem simply solved by
redefining what a "word" is with something like select-word-style? The
sledge hammer approach is to define words just as bash does with the
following. There are more subtle ways to just exclude : from the list
of word characters; such methods are adequately documented in the
manual. Of course, this approach has other (IMO consistent therefore
desirable) effects besides completion, such as ^W behavior.
autoload -U select-word-style
select-word-style bash
$ BLA=/foo:/us<TAB>
$ BLA=/foo:/usr/
On Mon, Sep 27, 2004 at 05:12:24PM +0200, Oliver Kiddle wrote:
> Also note that you can simply use:
> bindkey 'f' _bash_complete-word
>
> > I can tell you. It doesn't solve my original problem, which is that
> >
> > BLA=/usr:/us<COMPLETE>
>
> You can create a wrapper around _files to handle the colons:
>
> _my_files() {
> compset -P '*:'
> compset -S ':*'
> _files "$@"
> }
>
> Oliver
>
--
Joel Elkins <jde@xxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author