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

Completion Control (Novice qn)



Hi all,
   I need some help with completions. Basically what I want is
this. If I want to talk to a person on local network, I want talk to
complete the machine name.
Typically this is what I want.
talk person@`rwho | grep person | cut -d: -f1 | awk '{print $2}' |
head -1`

And this stuff is what I want zsh to complete. So I know that a
function has to be written, but I dont have a good idea as to how to
do this. A naive try that I did was

local from

read -Ac from
from="${from[1]}"

reply=( `rwho | grep $from | cut -d: -f1 | awk '{print $2}' | head -1` )

return

and it did not work. I would like to know what is the solution, and if
there is any ways of debugging such things.. (Like how to know the
value of variables being used).
Thanks a lot,
Regards,
-- 
------------------------------------------------------------------------
Varadarajan.T.S.                E-Mail : tsv@xxxxxxxxxxxxxxx
#725, 77, University Crescent,  HTTP   : http://www.cs.umanitoba.ca/~tsv
Winnipeg,                       Tel No : 1-(204)269-6036(Residence)
Manitoba - MB R3T 3N8                    1-(204)474-8827(Office)
Canada.                        
------------------------------------------------------------------------



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