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

Re: need help to convert final compctl!



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