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

completion with descriptions



How can I provide a description for every offered completion
like e.g. "kill" does it nicely?

# kill t<TAB>
process ID
28745 ?        00:02:11 tudu
28760 ?        00:00:00 tail
28879 pts/7    00:02:08 topcpu
28881 pts/8    00:00:08 tmp-cron-script


In my completion function I tried like this:
   ':cmds: compadd ${${(f)"$(gigaset --commands)"}%%[[:space:]]##--*}' \
but it only gives me this:

# condor:~>gigaset d<TAB>
del       demux     details   dir       divx      divxfast  dump

although "gigaset --commands" outputs:
...
dir         -- Liste der Aufnahmen
dump        -- Details anzeigen
details     -- (s. dump)
divx        -- Aufnahme ins DivX-Format konvertieren
divxfast    -- Aufnahme (schneller) ins DivX-Format konvertieren
demux       -- Aufnahme mit projectX demultiplexen
del         -- (s. rm)
...

For the last hours I read the manual and examples (like _pids) but
eventually got lost before finding the solution  :-(

Thanks,
 Andy.

-- 
 Finagle's First Law:
   If an experiment works, something has gone wrong.



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