zsh: add precmd and change user test to a case