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

Tab Completion Question.



Is there a way to build pattern matching into compctl lists?

Here's what I'm trying to do.  In my .zshrc I have the following set.

hosts=(foo.bar)
compctl -k hosts ssh 

I would like to be able to set the hosts variable to match for different
usernames.  So that the following command would tab complete:

ssh root@xxxxxxx

I would imagine that you would do this by setting something like:

hosts=([root@]foo.bar)

but that doesn't work at all.  

Of course I can always set something like

hosts=(foo.bar root@xxxxxxx)

but in reality I have TONS of hosts listed for the hosts= variable and creating
two entries for all of them would be a pain...  And eventually I would like to
be able to automatically parse my DNS condiguration files for this list...

Any ideas?

Thanks!

-- 

Zak L Brown

Audio/Systems Engineer
www.mode3.com
www.insulinmusic.com

--


"How Did Our Oil Get Under Their Sand?"



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