In Zsh by default the tab key is bound to
expand-or-complete. I would like to programatically access the list of completion candidates that would have been produced by pressed tab, so that I can write my own function and filter the list on my own. I understand that there is a "completion framework" that comes with Zsh but I would like to do it myself.
There is also the
list-choices function/widget which produces the same output as
expand-or-complete but doesn't offer the tab cycling functionality.
I've done a reasonably extensive search on Google and also poked through the Zsh source but came up dry. Any help would be appreciated.