Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: completion within word



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