zsh: separate battery status prompt generation into function