In some situations, zsh takes a long time to generate a list of completions. Maybe it needs to list some files on a remote server or maybe it needs to run a tool that has a long startup time. In these situations, after I press Tab to start completion, the screen display doesn’t change right away, and it’s not always clear whether zsh is still generating the list of completions, it has generated the list but there are no completions for the thing I’ve typed, or completion just isn’t supported in the current context.
Is there any way to display some kind of indicator while zsh builds the completion list? More generally, is there a way to have zsh run a user-defined function before it starts building the list and then have it run a different function when it’s done?