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

_describe usage



Hi,

I'm working on my first completion code for a non-trivial command, and I
don't understand what _describe is doing (or how to get it to do what I
want).

What I want is to see something like this in menu selection:
fruit
apple   banana
animal
cat     dog   

I've tried a couple of approaches. My reading of the man page seems to
imply I can do this:

    rts=(apple banana)
    srts=(cat dog)
    _describe "fruit" rts -- "animal" srts

But that gets me this:

jarrah:/# scrgadm -a -j blah -t <tab>
fruit
        apple   banana

and if I menuselect to the blank position under "fruit" I get "cat" on
the commmand line!

I also tried this:

    rts=(apple banana)
    srts=(cat dog)
    _describe "fruit" rts 
    _describe "animal" srts 

But then I see:

jarrah:/# scrgadm -a -j blah -t <tab>
fruit
animal
apple   banana  cat     dog   


What am I doing wrong?



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