When I use zsh and type sudo zypper install then TAB, zypper is launched and I cannot intereact with the shell for up to 30 seconds sometimes, the fix I was using was zstyle ':completion:*:zypper:*' use-cache on but that is no longer working.
I am wondering how I can make it work instantly like in bash
I had the same problem, but it was related to the enabled option: ENABLE_CORRECTION="true"
in my ~/.zshrc config. I just commented it out and the autocomplete started working fast, just like before.