zsh: move nextinstall into more universal zsh function