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

Re: exposing completions data to user



On Oct 18,  1:06am, Ben Veal wrote:
}
}    To do this I need access to the list of possible
}    completions and their descriptions.
}    As far as I can determine, this information is not
}    normally available

This is what the -O -A and -D options of the compadd builtin are meant
to accomplish.  Are you capturing completions for a specific context
for which you are writing the completion function, or are you trying
generically to capture the strings that any completion would normally
display via ZLE?

If the former you should be able to structure your own compadd calls
appropriately.  If the latter you might be able to get away with a
wrapper around "builtin compadd ..." that changes the arguments; see
for example what _approximate does.

}    and so I need to write a module
}    which exposes this data.

If you determine that you do need to go this way, looking at the
imlementation of the above compadd options is probably your best bet.



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