Fix "ret=0\n' bug on zsh