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

3.0.x completion on commands w/ common prefix



[ I'm not subscribed, so please CC me in ]

I'm using zsh 3.0.x, so this is all compctl-based.

I have a whole bunch of commands which all start with a common prefix.
I'd like to set a standard tab-completion for any command starting with
that prefix, no matter where in $PATH they are.  I'm stuck, and I've
checked the FAQ.

The specifics:
 * array $sshhosts with list of hostnames
 * commands all start remote_

So, eg, I can have "compctl -k sshhosts ssh sr" and that's fine.

I can match a given subset of these commands with:
 compctl -k sshhosts ~/bin/common/remote_*(:t)
which is fine.

But at any time, I might be working on a new remote_foo command, or
hacking a temporary one, or something.  With this, I'd have to manually
set the completion up.  This doesn't strike me as a zsh-ish solution.

Thoughts?
-- 
Civilisation: where they cut down the trees and name streets after them.



Messages sorted by: Reverse Date, Date, Thread, Author