Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: need help to convert final compctl!
- X-seq: zsh-users 3728
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: John Cooper <john.cooper@xxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: need help to convert final compctl!
- Date: Thu, 22 Mar 2001 20:59:48 +0000
- In-reply-to: <m31yrpaala.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <m31yrpaala.fsf@xxxxxxxxxxxxxxxxxxxxxxxxx>
On Mar 22, 7:05pm, John Cooper wrote:
} Subject: need help to convert final compctl!
}
} With the old compctl system, I used the functions below to be able
} to complete *arbitrary substrings* from a list of commonly used
} directories.
}
} I wondered how I can achieve the same thing with the new system?
As far as I can tell, like this:
_g() { compadd -U ${(M)dirs:#*$PREFIX$SUFFIX*} }
compdef _g g
Or put in a file named _g somewhere in $fpath:
#compdef g
compadd -U ${(M)dirs:#*$PREFIX$SUFFIX*}
but it hardly seems worth a separate file.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author